[R] Layout of mulitpage conditioned lattice plots
David Winsemius
dwinsemius at comcast.net
Sun Dec 19 21:31:13 CET 2010
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
>> levels push 3 of the A's onto the new row of panels and so
>> one.....and
>> then the second page is partially filled with the 9 remaining "C"'s.
>>
>>
>
> As you noted, the last page is the problem, and nsubj=13 was chosen by
> design. I am currently looking if ggplot2 can handle this case
> without large
> coding overhead.
I'm obviously not seeing what you think would be an acceptable
solution. Can you explain in words what you want, rather than what you
don't want in failed code?
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()
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list