I have looked at many of the questions on here that relate to aggregating time series data, but I can't seem to solve my problem. My data looks like this:
Pings Adult Entertainment Female Information Lifestyle Male MAV.TV MeTV News Pursuit Sports Young Adult
2015-01-05 07:30:00 1 0 0 0 0 0 0 0 0 0 0 0 0
2015-01-05 07:43:00 1 0 0 0 0 0 0 0 0 0 0 0 0
2015-01-05 07:44:00 1 0 0 0 0 0 0 0 0 0 0 0 0
2015-01-05 07:59:00 5 0 0 0 0 0 0 0 0 0 0 0 0
2015-01-05 08:02:00 1 0 0 0 0 0 0 0 0 0 0 0 0
2015-01-05 08:17:00 1 0 0 0 0 0 0 0 0 0 0 0 0
and I want to find a way to roll this up in 15 minute increments, summing every row. I've tried merge
and cut
and aggregate
and na.locf
methods, but none of them quite work. I've also tried period.apply
but I can't seem to get that to work.
cut.POSIXt
function has the option of specifying an interval along the lines ofbreaks="15 min"
. Seems like using that approach would be close to trivial if used in combination withaggregate
. – IRTFM