David, you solution
> qplot(ind, values, data=stack(data.frame(a,b,c)), geom="boxplot")
Works a treat - thank you!
Thierry, your solution
> ds <- data.frame(a = a, b = b, c = c)
> library(ggplot2) # loads qqplot2
> ggplot(melt(ds), aes(x = variable, y = value)) + geom_boxplot()
Also works.
I can
Dear Andreas,
melt() and cast() are nice tools for this kind of problems. They both
reside in the reshape package that automatic loaded when ggplot2 is.
a <- rnorm(100)
b <- rnorm(100,1,2)
c <- rnorm(100,2,0.5)
ds <- data.frame(a = a, b = b, c = c)
library(ggplot2) # loads qqplot2
ggplot(melt(ds)
On Apr 21, 2009, at 10:42 AM, Andreas Christoffersen wrote:
Hi,
ggplot/qplot is great - it has really helped me do some nice things.
However, simple boxplot of different columns/variables is a bit
tricky, because of (i think) qplot's generic Y conditional on X input
form. Se below.
# Some dat
3 matches
Mail list logo