Hello, I have some question on chron
I currently doing this t1 <- chron(,"11:30:00") t2 <- chron(,"11:45:00") tt <- seq(t1,t2,by=times("00:00:01")) tt has 901 values (15 minutes * 60 secs) and then x1 <- rnorm(1:901) x2 <- rnorm(1:901) x3 <- rnorm(1:901) df <- data.frame(tt, x1, x2, x3) I would like to write a function such that I can divide df vector into any interval, For e.g 10 secs, 5 secs, 15 secs etc.. How can I achieve this. Is there a way to subtract seconds on a chron object For e.g. #This should subtract 20 seconds, but doesn't work, looks like it is subtracting days newtime <- df$tt - 20 Please help. Rusty [[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.