Re: [R] ggplot2 multiple group barchart

2010-09-02 Thread ONKELINX, Thierry
nation of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey > -Oorspronkelijk bericht- > Van: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] Namens Waller Gregor

Re: [R] ggplot2 multiple group barchart

2010-09-01 Thread Jonathan Christensen
Greg, Try this: library (ggplot2) v1 <- c(1,2,3,3,4) v2 <- c(4,3,1,1,9) v3 <- c(3,5,7,2,9) gender <- c("m","f","m","f","f") d.data <- data.frame (v1, v2, v3, gender) d.data #library(reshape) #library(plyr) # These are already loaded by ggplot2, but for your reference: reshape provides melt

[R] ggplot2 multiple group barchart

2010-09-01 Thread Waller Gregor (wall)
hi there.. i got a problem with ggplot2. here my example: library (ggplot2) v1 <- c(1,2,3,3,4) v2 <- c(4,3,1,1,9) v3 <- c(3,5,7,2,9) gender <- c("m","f","m","f","f") d.data <- data.frame (v1, v2, v3, gender) d.data x <- names (d.data[1:3]) y <- mean (d.data[1:3]) pl <- ggplot (data=