Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks -- Shane [[alternative HTML version deleted]]
Read the posting guide, which tells you to provide a minimal reproducible
example [1] (there it's more than one way to accomplish what you have done
already) and post using plain text (so your R code comes through without being
corrupted).
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On May 19, 2014 7:08:00 AM PDT, Shane Carey <careyshan at gmail.com>
wrote:>Hi,
>
>I have boxplots by factors for a dataset and trying to include a
>boxplot to
>represent the entire dataset.
>
>Any idea how this would be done?
>
>Thanks
> I have boxplots by factors for a dataset and trying to include a boxplot to > represent the entire dataset.Have a look at last the example in ?boxplot which plots a second set of values beside a first set. In your case, specifying xlim larger than needed by one and then using boxplot(x, at=n+1) is the kind of thing you'd need to do. S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
tmp <- data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)),
g=rep(letters[1:3], each=20))
library(lattice)
library(latticeExtra)
A <- bwplot(y ~ g, data=tmp)
B <- bwplot(y ~ rep("Y",60), data=tmp, horizontal=FALSE)
resizePanels(c(Individual=A, "All Together"=B, layout=c(2,1)),
w=c(3,1))
## for even more options, you can look at the examples in
## the HH package
## install.packages("HH") ## if necessary
library(HH)
demo("bwplot.examples", package="HH")
example("panel.bwplot.superpose", package="HH")
?panel.bwplot.intermediate.hh
?panel.bwplot.superpose
On Mon, May 19, 2014 at 10:08 AM, Shane Carey <careyshan at gmail.com>
wrote:> Hi,
>
> I have boxplots by factors for a dataset and trying to include a boxplot to
> represent the entire dataset.
>
> Any idea how this would be done?
>
> Thanks
>
> --
> Shane
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.