Re: [R] Problem with ggplot2 - facet_wrap and boxplot

2009-01-07 Thread David Hajage
o. Well, it's working (replace 'group' by 'trt') Thank you very much Hadley. david 2009/1/7 hadley wickham > Hi David, > > > Here the problem : > > > > library(ggplot2) > > > > df <- data.frame(id = 1:100, x1 = c(rnorm(50), rnorm(50, 1)), x2 = > > c(rnorm(50), rnorm(50, 1.5)), x3 = c(rnor

Re: [R] Problem with ggplot2 - facet_wrap and boxplot

2009-01-07 Thread hadley wickham
Hi David, > Here the problem : > > library(ggplot2) > > df <- data.frame(id = 1:100, x1 = c(rnorm(50), rnorm(50, 1)), x2 = > c(rnorm(50), rnorm(50, 1.5)), x3 = c(rnorm(50, 0.5), rnorm(50, 2.5)), group > = as.factor(rep(c("a", "b"), each = 50))) > df.melt <- melt(df, id = c("id", "group")) > head(d