[R] order of panels in xyplots

Titus Malsburg malsburg at gmail.com
Wed Nov 25 19:33:06 CET 2009


On Wed, Nov 25, 2009 at 7:03 PM, Titus Malsburg <malsburg at gmail.com> 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, data, index.cond=rank(unique(data$trial)))

(Strange phenomenon, that I very often find the solution myself
minutes after posting to the mailing list.)

Best,
   Titus




More information about the R-help mailing list