I am new to R and have never posted on this website before, so if I haven't provided enough information or if this is badly phrased, I apologize in advance.
I have a data frame that represents energy data every 5 minutes. To find the basal rate over the entire day, I want to sum every 5 values (for a 30-minute period) and find the lowest value every 5 minutes
So if I had (a, b, c, d, e, f, g, h, i) with each letter representing a data point, I would want it to find the sum of:
- (a, b, c, d, e, f)
- (b, c, d, e, f, g)
- (c, d, e, f, g, h)
- (d, e, f, g, h, i)
If the function can choose which of these 4 is the lowest, that would be perfect, but if it can just provide me sums in a new column, I could just sort that with another function.
My data looks like this (but a lot longer, not sure if I should post the whole thing):
Time Value
1:00 5.5
1:05 5.3
1:10 5.4
1:15 6.3
1:20 4.6
1:25 6.4