There are many ways to aggregate in R. See Grouping functions (tapply, by, aggregate) and the *apply family 
Here's another way with tapply:
# input data (since OP contains none)
> v = replace(numeric(24), c(3:4, 6:10), c(0.6, 0.2, 0.2, 3.2, 0.8, 0.4, 1))
> 
> lapply(c(1, 6, 12, 24), function(n) tapply(v, rep(1:24, each=n, length.out=24), sum))
[[1]]
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24 
0.0 0.0 0.6 0.2 0.0 0.2 3.2 0.8 0.4 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 
[[2]]
  1   2   3   4 
1.0 5.4 0.0 0.0 
[[3]]
  1   2 
6.4 0.0 
[[4]]
  1 
6.4