search for: cumrain

Displaying 2 results from an estimated 2 matches for "cumrain".

Did you mean: crain
2013 Mar 26
2
Plot cumulative sums of rainfall per year
...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 beginning of each year but I cannot plot the cumulative sum of rainfall in a way that each year is represented by a separate l...
2008 Mar 26
3
Loop problem
Dear all, I have a problem with a loop, if anyone has any knowledge on these things I would appreciate some comments. The code below is designed to allow me to extract the top record of the data frame, and them remove rows from the data frame which have an index close to the extracted top record. topstorm<-subset(rankeddataset[1,]) ## Extracts the top storm