? cumsum something like
library(chron) # Reporting packages you use is always considerate mt <- times(c('00:05:00', '00:15:00', '00:30:00')) # Spaces are legible! times("09:30:00") + cumsum(mt) Michael On Tue, Apr 24, 2012 at 11:35 AM, René Mayer <ma...@psychologie.tu-dresden.de> wrote: > Dear List, > given a vecor of times in 5,15 and 30 minutes and a start point > in time, lets say 09:30:00, how do I add up those times > to the start time getting a cumulative time sequence? > > mt<-times(c('00:05:00', '00:15:00', '00:30:00')) > mt wanted > 00:05:00 09:35:00 > 00:15:00 09:50:00 > 00:30:00 10:20:00 > > Regards, > René > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.