Skip to content
Prev 86056 / 398528 Next

bwplot: how to display response variables separately in same panel?

On 2/8/06, Chris Behr <cbehr at edesigndynamics.com> wrote:
Unless you want to write your own panel function, you need to start by
coercing the data into the `long' format, e.g.

df <- data.frame(y = c(y1, y2), x = rep(x, 2), which = gl(2, length(x)))

Then you can probably do [untested]

bwplot(y ~ which | x, df, layout = c(nlevels(x), 1))

or

bwplot(y ~ x:which, df)

Deepayan