[R] Layout of mulitpage conditioned lattice plots

Dieter Menne dieter.menne at menne-biomed.de
Sun Dec 19 17:23:06 CET 2010

Dear latticists,

I would like to spread a lattice conditioned plot over multiple pages,
keeping the same layout as if I had only one page as shown in the code

My workaround is to divide the dataframe into subset that fit on one page,
but the code is ugly. 

Is there a build-in way to achieve this?


nsubj = 13 # This number is variable
dt = expand.grid(time=1:20,comp=LETTERS[1:3],subj=letters[1:nsubj])
dt$val = rnorm(nrow(dt))

# How it should look:
xyplot(val~time|subj+comp, data=dt,type="l",layout=c(10,3),
  subset=as.integer(subj) <= 10)

# What to do if it stretches over multiple pages, but I want the same
# layout as above?
xyplot(val~time|subj+comp, data=dt,type="l",layout=c(10,3))

View this message in context: http://r.789695.n4.nabble.com/Layout-of-mulitpage-conditioned-lattice-plots-tp3094581p3094581.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list