[R] how to draw two series in bwplot

Weidong Gu wgu at uab.edu
Fri Feb 5 19:00:00 CET 2010


Hi,

I have two numeric columns (dat1 and dat2) to bwplot

data=expand.grid(dat1=rnorm(20,10,5),class=1:5,school=letters[1:3]))
data$dat2=rnorm(300,13,6)

What I want is to plot two boxes side by side for class, 

bwplot((dat1+dat2)~as.factor(class)|school,data=data)

but the code does not work this way, instead it plots addtions of the two columns. I changed allow.multiple with no success. 

Your help is appreciated.

Weidong Gu
 
Department of Medicine
University of Alabama, Birmingham



More information about the R-help mailing list