Hello,
I have a numerical variable (x) and a series of categories. I would
like to make a box plot of x against each of the categories. How can I
arrange the data so that I can accomplish it with lattice?
At the moment I got this:
```
df = data.frame(x = c(rep(1,5), rep(2,5), rep(3,5)),
y = rnorm(15),
f1 = rep(letters[1:5],3),
f2 = rep(letters[7:9],5),
f3 = c(rep(LETTERS[10:12],4), LETTERS[10:12]))
df$x = factor(df$x)
df$f1 = factor(df$f1)
df$f2 = factor(df$f2)
df$f3 = factor(df$f3)
library(lattice)
bwplot(y ~ x, data = df, auto.key = TRUE )
```
Also, is it possible to have the wishers in solid line?
Thank you

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to