search for: test_cumu

Displaying 1 result from an estimated 1 matches for "test_cumu".

Did you mean: test_com
2013 Mar 26
2
Plot cumulative sums of rainfall per year
...year of cumulative rainfall as a separate line in one graph preferably using ggplot with the x-axis showing the julian day 1 to 365 (366) and the y-axis showing the cumulative values. I have the following code: library(plyr) library(ggplot2) data<-read.csv("http://dl.dropbox.com/u/4236038/test_cumu.csv") data$year <- as.numeric(format(as.Date(data$Date), format="%Y")) ddply(data,.(year),transform,cumRain = cumsum(Rainfall))->cumu ggplot(cumu, aes(Date,cumRain))+geom_point() What it does it perfectly calculates the cumulative sum of the rainfall and resets the sum at the...