Re: [R] superpose two variables in lattice/xyplot

From: Arien Lam <a.lam_at_geo.uu.nl>
Date: Mon 15 May 2006 - 16:21:03 EST

On Fri, May 12, 2006 17:52, Deepayan Sarkar wrote:

> On 5/12/06, Arien Lam <A.Lam@geo.uu.nl> wrote:

>> Dear R users,
>>
>> I try to use xyplot() to display two different response variables from
>> the same dataframe per panel, but don't succeed:
>>
>> xyplot(ptot.seaslog ~ vmcwit | seas, data=reeks, as.table=TRUE,
>> panel = function(x,y){
>> panel.xyplot(x, y, ylim=c(0,1))
>> panel.superpose(x=reeks$vmcwit, y=reeks$ptotbin,
>> panel.groups = "panel.xyplot", groups=reeks$seas,
>> subscripts = TRUE, col="red" )
>> }
>> )
>>
>> The second respons variable "reeks$ptotbin" is plotted, but is not
>> subset for each of 4 panels. How can it be done?
>
> Perhaps you are looking for
>
> xyplot(ptot.seaslog + ptotbin ~ vmcwit | seas, data=reeks, as.table=TRUE)
>
> -Deepayan
>

I am. Thank you for the solution!

Arien



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon May 15 16:26:11 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 15 May 2006 - 18:10:09 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.