[R] Direction of panel plots in trellis graphics
Yan Wong
h.y.wong at leeds.ac.uk
Fri Jul 13 20:05:01 CEST 2007
On 13 Jul 2007, at 17:11, deepayan.sarkar at gmail.com wrote:
>
> Another high level option is to change the rule determining how
> packets are chosen for a given panel in the layout.
>
> print(tmp.tr3,
> packet.panel = function(layout, row, column, ...) {
> layout <- layout[c(2, 1, 3)]
> packet.panel.default(layout = layout,
> row = column,
> column = row, ...)
> })
>
> This effectively transposes the layout, which (along with
> as.table=TRUE) is what you want.
Thank you Deepayan, that does exactly what I want.
Also thanks for the other suggestions by Gabor and Richard.
Unfortunately these don't quite work in my case, as I am printing to
multiple pages (so Richard's suggestion of transposing becomes
tricky), and my 2 conditioning variables are on the rhs and lhs of
the formula (i.e. y1 + y2 = x | v) (so I can't easily create a new
combination factor as in Gabor's situation).
Cheers
Yan
More information about the R-help
mailing list