Description Usage Arguments Details Value Examples

Calculate series of averages over the periods specified in the `period`

argument into the inpur data.table.

1 2 |

`x` |
data.table with columns |

`period` |
The periods over which the averages will be calculated, see Details |

`agg_by` |
Function for specification of the period (season, month) to be additionaly included in output, see Details |

`full_return` |
(logical) Should the average be repeated for each scale along with original time series? Default is FALSE (e.g. for M1 only monthly and not daily time series is returned) |

`remove_incomplete` |
Should the incomplete years be removed from results? Default is TRUE |

The original time series in daily time step is decomposed into series of averages ove periods specified in `periods`

argument using letter codes 'D' - day(s), 'M' - month(s), 'Y' - year(s) followed by number corresponding to number of periods and 'G1' the overall mean. The periods must be given in order from longest to shortest, the overall mean is always included (and needs not to be specified in `period`

). Shorter periods are always identified within the closest longer periods, i.e. each shorter period is included in exactly one longer period. As a result, the averages may be calculated over shorter periods than specified. This is due to varying length of "month" and "year" periods. The actual length used for averaging is included in the output. To make further assessment of the decomposed objects easier, indicator of period within the year (e.g. quarter or month) as specified by `agg_by`

argument is included in the output.

data.table with variables:

- variable
factor indicating the variable

- DTM
date

- period
specification of the averaging length with 'D' - day(s), 'M' - month(s), 'Y' - year(s) and 'G1' - the overall mean

- value
value of the variable for given averaging length

- sub_period
indication of the aggregating scale specified by

`agg_by`

argument- period_pos
average date of the interval

- N
real length of the vectors used for calculating averages

- TS
averaging length in hours

1 2 3 4 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.