Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Clustered Box Plot



pdf("graphics/rplot-bwplot.pdf")
mydata <- data.frame(Y = rnorm(3*1000),
                     INDFACT =rep(c("A", "B", "C"), each=1000),
                     CLUSFACT=factor(rep(c("M","F"), 1500)))
library(lattice)
trellis.device(new=FALSE, col=FALSE)
bwplot(Y ~ INDFACT | CLUSFACT, data=mydata, layout=c(2,1))
dev.off()

http://rattle.togaware.com/code/rplot-bwplot.R



Copyright © 2004-2006 [email protected]
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.