Skip to content
Prev 132513 / 398506 Next

Question about which kind of plot to use

On Wednesday 19 December 2007, Max wrote:
How about a lattice plot using panels ? plot the distribution of each score 
(box and whisker style), using a panel for each group?

a <- rnorm(100)
b <- rnorm(100)
c <- rnorm(100)
 d <- rnorm(100)

library(lattice)
new <- make.groups(a,b,c,d

new$grp <- rep(gl(5,20, labels=c('A','B','C','D','E')), 4)

bwplot(data ~ which | grp, data=new)

Not quite means, but close!

Dylan