[R] xyplot#strips like ggplot?

Christian Ritter critter at ridaco.be
Thu Oct 8 15:47:11 CEST 2009


Dear all,

I want to split the strips in xyplot and push them into the margins ...

Tried to find this in common documentation (such as Deepayan's book) on
lattice ... but so far without success ...

Here is the situation:

xyplot(Speed~Count|Lane*Day,...)

where Speed and Count are numeric, Lane and Day are factors.

By default, this makes a double strip on top of each graph. I can change
this to make a strip on the left or change the strip layout.

What I want to do, is to write the strips in the margins of the layout.
That is, to put the strips corresponding to 'Lane' above the top row of
graphs and the strips corresponding to 'Day' vertically at the right of
the graphs. Such as qplot(Count,Speed,facets=Lane~Day) would do in ggplot2.

Can anyone of you tell me how to do this in an elegant (and fast way).
[the obvious solution is to take qplot, but it is too SLOW].

Thanks in advance for your assistance,

Chris.




More information about the R-help mailing list