Skip to contents

Provides a rolling aggregation of a user defined periods.

Usage

rollingAggs(x, rolls = NULL, interval = 0.25, method = "mean")

# S3 method for data.table
rollingAggs(x, rolls = NULL, interval = 0.25, method = "mean")

Arguments

rolls

User defined periods of aggregation

interval

Set as 0.25 to represent 15 minute data, for hourly change to 1 etc.

method

'min', 'max', 'mean', 'median', and 'sum' options available

dt

Input dat in R6 object

Value

A dataset containing numerous aggregations on a roll

Examples

## Do not run
# rollingAggs(Buildwas)