On Mon, Oct 13, 2008 at 3:38 PM, erwann rogard <[EMAIL PROTECTED]> wrote: > hello, > > i need help with: > > data$f1<-as.factor(data$f1) > data$f2<-as.factor(data$f2) > s3<-equal.count(data$s2,number=3) > densityplot(~y| f1 + f2 + s3, > data=mydata > ) > > this produces 3 plots, *successively*, one for each value of s3. i was > hoping it would produce one plot. is trellis limited to 2 conditional > variables? if not, what are the appropriate commands?
The default layout uses multiple pages for 3 or more conditioning variables. If you want to get them on a single page, you need to specify the layout as c(ncol, nrow), e.g., densityplot(~y| f1 + f2 + s3, data=mydata, layout = c(5, 4)) Alternatively, if you just want to specify the number of panels per page, and want the details to be computed automatically (as with one conditioning variable), you can do densityplot(~y| f1 + f2 + s3, data=mydata, layout = c(0, 20)) ?xyplot has details. -Deepayan ______________________________________________ R-help@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.