resample_and_aggregate | R Documentation |
Time series resampled to the desired timestep and the values are aggregated using the aggregation function defined. Timestep of the original series must be shorter than the output timestep of the series.
resample_and_aggregate(data, timestep, func, minRatio = 0, estimate = T)
data |
<data.frame> describing the input time series to be resampled. Time column: 'time', value column: 'value'. If you use weighted average aggregation, you must include a column in data named 'weights'. |
func |
<string> A string defining the function to use in aggregate (options are: "SUM" to sum up the values at each time step,"WEIGHTED-AVG" to calculate the weighted average of the values at each time step, "AVG" to calculate the mean of the values at each time step). |
minRatio |
<float> Minimum percentage of known values in a timestep to calculate the desired aggregation. Default is 0%. Unit is percentage. |
estimate |
<boolean> defining if the output value should be an estimated value (theoretical linear approximation considering the time step) or the real value (gaps are unconsidered, if they exist). |
timeStep |
<string> A string in ISO 8601 format representing the period or timestep (e.g. "PT15M","PT1H", "P3M", "P1D" ,...). |
<data.frame> corresponding to the resampled and aggregated time series
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.