[R] Dropping 'empty' panels from lattice

amvds at xs4all.nl amvds at xs4all.nl
Tue Apr 28 15:06:14 CEST 2009


I have 8 cofactors possibly affecting one and only one variable.

I make conditional histograms:

<-pdf(file="tst3.pdf",paper="special",width=36,height=36)
<-histogram(~Oversized|dat$c1*dat$c2*dat$c5*dat$c6*dat$c7*dat$c8*dat$c9*dat$c10,nint=21,layout=c(32,8),data=dat,type="count")
<-dev.off()

This works (compliments to R developers!) but it does generate a large
plot with many panels being 'empty', e.g. that combination of factors
c1..c10 never occurs in this data set.

Is there a way to autmatically drop those empty panels?

I looked at the docs: there is a drop.unused.levels parameter for trellis
graphs but the docs says it is default true. I checked but could not make
much sense out of the list of possibilties.

Thanks!
Alex van der Spek




More information about the R-help mailing list