[R] xyplot question

From: Christoph Scherber <Christoph.Scherber_at_uni-jena.de>
Date: Wed 07 Dec 2005 - 04:30:06 EST


Dear R users,

I have a question regarding the use of xyplot in the lattice() package. I have two factors (each with two levels), and I´d like to change the order of the panels in a 2x2 panel layout from the default alphabetic order that R uses based on the names of the factor levels.

My approach is (in principle)

xyplot(y~x|Factor1+Factor2)

Let´s assume, my factor levels for Factor1 are A and B, and for Factor2 they´re C and D, respectively.

Now the default arrangement of my panels would be (from bottom top left to bottom right): "BC","CA","BD","AD"

What I´d like to have is "BD","AC","BC","AD".

Can anyone tell me how to solve this problem easily?

I´ve read that using "perm.cond" and/or "index.cond" could solve this problem, but couldn´t find an appropriate example, unfortunately...

Thank you very much for your help!

Regards,
Christoph



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 Wed Dec 07 05:16:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:29 EST