Re: [R] order of panels in xyplots

2009-11-27 Thread Deepayan Sarkar
On Thu, Nov 26, 2009 at 12:09 AM, Titus Malsburg wrote: > The documentation of xyplot could be improved here.  It says: > >  "If 'index.cond' is a list, it has to be as long as the number of > conditioning >   variables, and the 'i'-th component has to be a valid indexing vector for > the >   in

Re: [R] order of panels in xyplots

2009-11-26 Thread Peter Ehlers
You're right, Titus. I misunderstood. It looks like index.cond has to be in 1:(number of panels being plotted for factor f). While this can arguably be covered by the phrase "valid indexing vector", I agree that this could be made more explicit. -Peter Ehlers Titus Malsburg wrote: Peter, thank

Re: [R] order of panels in xyplots

2009-11-26 Thread Titus Malsburg
Peter, thanks for your response! The problem is not how indexing works, but rather the question what is being indexed here. If I understand the description correctly then it is wrong. In the special and common case where all possible levels do actually occur in the data frame it coincidentally h

Re: [R] order of panels in xyplots

2009-11-25 Thread Peter Ehlers
Titus Malsburg wrote: The documentation of xyplot could be improved here. It says: "If 'index.cond' is a list, it has to be as long as the number of conditioning variables, and the 'i'-th component has to be a valid indexing vector for the integer vector '1:nlevels(g_i)' (which can, am

Re: [R] order of panels in xyplots

2009-11-25 Thread Titus Malsburg
The documentation of xyplot could be improved here. It says: "If 'index.cond' is a list, it has to be as long as the number of conditioning variables, and the 'i'-th component has to be a valid indexing vector for the integer vector '1:nlevels(g_i)' (which can, among other things, repeat

Re: [R] order of panels in xyplots

2009-11-25 Thread S Devriese
On 11/25/2009 07:33 PM, Titus Malsburg wrote: > On Wed, Nov 25, 2009 at 7:03 PM, Titus Malsburg wrote: > >> I was expecting >> that this should plot the panels in the order in which the levels >> occur in the data frame: >> >> xyplot(dur~roi|trial, data, index.cond=unique(as.integer(data$tria

Re: [R] order of panels in xyplots

2009-11-25 Thread Titus Malsburg
On Wed, Nov 25, 2009 at 7:03 PM, Titus Malsburg wrote: >  I was expecting > that this should plot the panels in the order in which the levels > occur in the data frame: > >  xyplot(dur~roi|trial, data, index.cond=unique(as.integer(data$trial))) The answer is apparently: xyplot(dur~roi|trial, d

[R] order of panels in xyplots

2009-11-25 Thread Titus Malsburg
I'd like do a simple xyplot with customized order of panels and try to understand how to use index.cond for that. Several attempts didn't deliver the correct results. Now, I noticed the following: > p <- xyplot(dur~roi|trial, data) > p$index.cond [[1]] [1] 1 2 3 4 5 6 7 8 9 10 These num