4/1/2014 0:11 40.769 -73.9549 B02512|
4/1/2014 0:17 40.7267 -74.0345 B02512|
4/1/2014 0:21 40.7316 -73.9873 B02512|
4/1/2014 0:28 40.7588 -73.9776 B
Using lubridate
's floor_date
function:
df$interv<-lubridate::floor_date(df$time, unit="15 minutes")
(This assumes that your time column is some recognized date-time format (e.g., POSIXt), which it doesn't seem to be from your sample's formatting.)
For example:
a<-Sys.time()
a
[1] "2019-01-08 09:22:22 EST"
floor_date(a,unit="15 minutes")
[1] "2019-01-08 09:15:00 EST"