i got a set of data (1 point each minute) that i want to sum by time but when i apply this code:
library(xts)
a2.xts <- xts(data$data, as.POSIXct(data$time))
a3.xts <- period.apply(a2.xts, INDEX=endpoints(a2.xts, "mins", k=10), FUN=sum)
head(a3.xts)
i get
2016-11-07 11:35:00 23
2016-11-08 11:45:00 56
2016-11-08 11:55:00 66
2016-11-08 12:05:00 32
2016-11-08 12:15:00 23
but i want it to start from 11:40, 11:50 and so on not 35,45. Thank you