[R] Sum per hour
jessica.gervais at tudor.lu
jessica.gervais at tudor.lu
Thu May 24 20:49:14 CEST 2007
Dear all,
I have a list of precipitation record and a list of time
I would like to sum them up per hour, or per day.
Does such a function exist ?
example:
time<-c("2000-10-03 14:00:00","2000-10-03 14:10:00","2000-10-03
14:20:00","2000-10-03 15:30:00","2000-10-03 16:40:00","2000-10-03
16:50:00","2000-10-03 17:00:00","2000-10-03 17:10:00","2000-10-03
17:20:00","2000-10-03 18:30:00","2000-10-04 14:00:00","2000-10-04
14:10:00","2000-10-04 14:20:00","2000-10-04 15:30:00","2000-10-04
16:40:00","2000-10-04 16:50:00","2000-10-04 17:00:00","2000-10-04
17:10:00","2000-10-04 17:20:00","2000-10-04 18:30:00")
precipitation<-c(0,0.1,0,0,0,0,0.2,0.3,0.5,6,7,8,9,1,0,0,0,0,1,0)
DATA<-cbind(time,precipitation)
... ?
how to sum up per hour ?
Thanks in advance
Jessica
More information about the R-help
mailing list