I think a command like the following will return a list of values ββthat fall into 3 minute intervals. ( v is the name of the data frame, and datecol is the name of the date column)
library(plyr) v<-data.frame(datecol=as.POSIXct(c( "2010-01-13 03:02:38 UTC", "2010-01-13 03:03:14 UTC", "2010-01-13 03:05:52 UTC", "2010-01-13 03:07:42 UTC", "2010-01-13 03:09:38 UTC", "2010-01-13 03:10:14 UTC", "2010-01-13 03:12:52 UTC", "2010-01-13 03:13:42 UTC", "2010-01-13 03:15:42 UTC", "2010-01-13 03:16:38 UTC", "2010-01-13 03:18:14 UTC", "2010-01-13 03:21:52 UTC", "2010-01-13 03:22:42 UTC", "2010-01-13 03:24:19 UTC", "2010-01-13 03:25:19 UTC" )), x = cumsum(runif(15)*10),y=cumsum(runif(15)*20)) dlply(v,.(cut(datecol,"3 min")),"[")
George dontas
source share