Skip to content

histograms with more than one variable

1 message · Liaw, Andy

#
Sounds like you want something similar to:

library(lattice)
y <- rnorm(40)
group <- rep(1:2, each=20)
histogram(~y | group)

Andy
<http://callisto.si.usherb.ca:8080/bshipley/>
http://callisto.si.usherb.ca:8080/bshipley/

 



______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html