You are right, I'll try to be more specific
Thats the code I used:
library(zoo)
library(xts)
library(timeSeries)
days1<-endpoints(p_79_84,"days")
sum_79_84<-period.apply(p_79_84, days1, colSums)
And thats a sample of the xts file I used (I show only the first 5 columns and rows)
1979-01-01 07:00:00 || 8 || 9 || 1 || 1
1979-01-01 08:00:00 || 8 || 1 || 1 || 1
1979-01-01 09:00:00 || 3 || 3 || 3 || 2
1979-01-01 10:00:00 || 3 || 3 || 6 || 9
1979-01-01 11:00:00 || 2 || 1 || 1 || 2
Sorry if my depiction of the data and the code isn't very detailed, I'm new to this site and still try to figure out how it works