So, to complete Bill Dunlap's thought and combine it with your desired goal,
I believe this gets you what you wanted...

start.time <- as.POSIXct("2009-04-10 12:00:00")
event.times <- start.time + c(1,2,3,61,62,122,135,200)
event.values <- rnorm(length(event.times))
et <- data.frame(event.times,event.values)
et$trunc.times <- as.POSIXct(trunc(event.times, units="mins")) 
data.frame(table(et$trunc.times))

                 Var1 Freq
1 2009-04-10 12:00:00    3
2 2009-04-10 12:01:00    2
3 2009-04-10 12:02:00    2
4 2009-04-10 12:03:00    1


-Wil Doane
-- 
View this message in context: 
http://www.nabble.com/Frequency-Counts-per-Time-Period-tp22992862p22994500.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to