Re: [R] ggplot2 stacked bar - sum of values rather than count

2012-01-17 Thread J Toll
On Mon, Jan 16, 2012 at 1:13 AM, Paul wrote: > On 16/01/12 02:08, J Toll wrote: >> Hi, >> >> I'm trying to create a stacked bar plot using ggplot2. Rather than >> plotting the count of each of the 13 "Bar" factors on the Y axis, I >> would like to represent the sum of the Values associated with ea

Re: [R] ggplot2 stacked bar - sum of values rather than count

2012-01-16 Thread Paul
On 16/01/12 02:08, J Toll wrote: > Hi, > > I'm trying to create a stacked bar plot using ggplot2. Rather than > plotting the count of each of the 13 "Bar" factors on the Y axis, I > would like to represent the sum of the Values associated with each of > the 13 "Bar" factors. Is there a way to do th

Re: [R] ggplot2 stacked bar - sum of values rather than count

2012-01-15 Thread J Toll
On Sun, Jan 15, 2012 at 9:15 PM, Richard M. Heiberger wrote: > This is based on lattice, not ggplot, and I hope I understand what you are > trying to do. > > require(lattice) > > x <- read.table(text=" >     Value Bar Segment >  1.10020075   1   1 > -1.37734577   2   1 >  2.50702876  

Re: [R] ggplot2 stacked bar - sum of values rather than count

2012-01-15 Thread Richard M. Heiberger
This is based on lattice, not ggplot, and I hope I understand what you are trying to do. require(lattice) x <- read.table(text=" Value Bar Segment 1.10020075 1 1 -1.37734577 2 1 2.50702876 3 1 0.58737028 3 2 0.21106851 3 3 -2.50119261 4