Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-20 Thread Dieter Menne
David Winsemius wrote: Here's my latest guess at what you may want: pdf(file=multpage.pdf) xyplot(val~time|subj + comp, data=dt,type=l, layout=c(3,5, 3), skip=rep(c(rep(FALSE,13), TRUE, TRUE), 3) ) dev.off() Not really, but skip was the right idea. I added

[R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread Dieter Menne
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 below. 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

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread Dennis Murphy
Hi Dieter: If I read your intention correctly, you need a third element in layout = . Here's a little example: df - data.frame(month = rep(month.abb, each = 20), time = rep(1:20, 12), y = rnorm(240)) xyplot(y ~ time | month, data = df, layout = c(2, 2, 3))

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread David Winsemius
On Dec 19, 2010, at 11:23 AM, Dieter Menne wrote: 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 below. My workaround is to divide the dataframe into subset that fit on one

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread Thomas Adams
Dennis, Thank you; this helps me, too! Tom On 12/19/10 11:45 AM, Dennis Murphy wrote: Hi Dieter: If I read your intention correctly, you need a third element in layout = . Here's a little example: df- data.frame(month = rep(month.abb, each = 20), time = rep(1:20, 12),

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread Dieter Menne
djmuseR wrote: If I read your intention correctly, you need a third element in layout = . df - data.frame(month = rep(month.abb, each = 20), time = rep(1:20, 12), y = rnorm(240)) xyplot(y ~ time | month, data = df, layout = c(2, 2, 3)) This

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread Dieter Menne
David Winsemius wrote: What's not working? I see two pages output with the same layout. The difference is that in the second case your numbers of groups (subj x comp) is not an even multiple of your layout numbers, so the 13 subj levels push 3 of the A's onto the new row of

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread Dieter Menne
Here is an example with ggplot2, which can also be used in a similar way with lattice. Again, the last page is the problem: the arrangement is correct here, but the last page (with 1 instead of 5 plots) has a different panel size which makes a comparison difficult. And, since I have much more

Re: [R] Layout of mulitpage conditioned lattice plots

2010-12-19 Thread David Winsemius
On Dec 19, 2010, at 1:53 PM, Dieter Menne wrote: David Winsemius wrote: What's not working? I see two pages output with the same layout. The difference is that in the second case your numbers of groups (subj x comp) is not an even multiple of your layout numbers, so the 13 subj