Re: [R] ggplot2 multiple group barchart

2010-09-02 Thread ONKELINX, Thierry
Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Waller Gregor (wall) Verzonden: woensdag 1 september 2010 17:16 Aan: r-help@r-project.org Onderwerp: [R] ggplot2 multiple group barchart hi there.. i got a problem

[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=d.data, aes

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(), plyr