[R] Boxplots

Richard M. Heiberger rmh at temple.edu
Mon May 19 18:33:33 CEST 2014


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.



More information about the R-help mailing list