r - How to reference to other periods or columns when using aggregate() -


When using altogether, how can I reference the previous period within the function? For example, if the days are collected from the day, how can the context of the previous day be described from the next day to calculate the function. For example, if I have a one hour hourly time series of one year and I could reduce the maximum from one day to the previous day's minimum two different sets, one can change it and separate it from the other. Was, but how can I do it out of a total?

How do I know the number of pieces (day here) where I am able to use it inside the function?

Cheers

Unless you sort properly, you You can use the shift () function.


Comments