[R] Dropping 'empty' panels from lattice

Dieter Menne dieter.menne at menne-biomed.de
Tue Apr 28 15:54:31 CEST 2009


 <amvds <at> xs4all.nl> writes:

> 
> 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?
> 

Since there is little hope that you get a useful arrangement in the
2D-paper world, and neither in 4D relativistic space, I would
suggest to make a new factor by pasting all cX factors, use that
as the only grouping factor. 

Dieter




More information about the R-help mailing list