Hey All, I want to duplicate the records but add a new "timestamp" columns as new time series, but I dont know how to do that.
my dataset(dat1) looks like this: No. TimeStamp Var1 1 2012-06-18 06:00:00 3 2 2012-06-18 06:06:00 4 I use this code to do duplication: dat1[rep(1:nrow(dat1),each=3),] But I dont know how to change the timeStamp. I would like the final output be sth like this: No. TimeStamp Var1 1 2012-06-18 06:00:00 3 2 2012-06-18 06:02:00 3 3 2012-06-18 06:04:00 3 4 2012-06-18 06:06:00 4 5 2012-06-18 06:08:00 4 6 2012-06-18 06:10:00 4 So basically the old time interval is 6 min, but the new ones I would like to have is 2 min. Thanks, [[alternative HTML version deleted]] ______________________________________________ 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.