[R] ggplot cumsum refined question (?)

2009-10-06 Thread stephen sefick
OK, so maybe last night was a little too much at one throw, so I have reduced the data to two stations- one that has precipitation and one that does not. This is going to be in the context of a larger data set. I would like to be able to issue a ggplot command and have cum sum just act on the

Re: [R] ggplot cumsum refined question (?)

2009-10-06 Thread ONKELINX, Thierry
[mailto:r-help-boun...@r-project.org] Namens stephen sefick Verzonden: dinsdag 6 oktober 2009 16:07 Aan: r-help@r-project.org Onderwerp: [R] ggplot cumsum refined question (?) OK, so maybe last night was a little too much at one throw, so I have reduced the data to two stations- one that has

Re: [R] ggplot cumsum refined question (?)

2009-10-06 Thread hadley wickham
It is much easier to do you data preparation before plotting. Cummul - ddply(subset(DF, precipitation!=NA), gauge_name, function(x){        x$Cummul - cumsum(x$precipitation)        x }) With a little less typing: Cummul - ddply(subset(DF, precipitation!=NA), gauge_name, transform,

Re: [R] ggplot cumsum refined question (?)

2009-10-06 Thread stephen sefick
The date time stamp is not the same? data.frame(as.chron(Cumul[,date_time]), DF[,date_time]) On Tue, Oct 6, 2009 at 9:31 AM, hadley wickham h.wick...@gmail.com wrote: It is much easier to do you data preparation before plotting. Cummul - ddply(subset(DF, precipitation!=NA), gauge_name,