[R] xyplot (Lattice): Group order in display

Deepayan Sarkar deepayan.sarkar at gmail.com
Tue Sep 7 10:30:52 CEST 2010


On Thu, Sep 2, 2010 at 1:28 AM, jrflanders <jrflanders at gmail.com> wrote:
>
> Thank you! It is always so simple...
>
> May I throw another question at you? In useOuterStrips, in the latticeExtra
> package, I am having problems calling custom strip names, e.g.
>
> useOuterStrips(xyplot(y-x | LOCATION + EVENT, data = TC6, groups = TYPE),
> strip=strip.custom(factor.
> levels = c("Left", "Middle", "Right 1","Right 2"), bg="snow3"),
> strip.left=strip.custom(factor.levels = c("October 2009", "April 2010",
> "June 2010"),bg="snow2")
>
> Strip names should be location and strip.left should be event. For some
> reason the factor.levels labels just aren't printing. It just says "EVENT."
> strip works just fine.

Maybe you need

xyplot(y-x | LOCATION + factor(EVENT), ...

? Without the factor(), EVENT could be a shingle (it's hard to be sure
without a reproducible example).

-Deepayan



More information about the R-help mailing list