aggr_rep_lag | R Documentation |
Helper function to repeat the aggregate annual value of a series on each period, and possibly lag it.
aggr_rep_lag(x, fun = mean, k = 0)
x |
(ts) Any time series |
fun |
(function) Aggregation function, mean by default |
k |
(int) Units to lag. |
Applies aggregate.ts
to the series to get the annual values
and then repeats those values for every subyear period.
The k
parameter is passed to stats::lag
.
description
aggr_rep_lag(gdp_volume) |> plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.