mavc | R Documentation |
mavc
calculates the k
-period centered moving avarage of a vector or time series.
When k
is even the series length is increased by one and the two
endpoints are weighted by 0.5.
mavc(x, k)
x |
Numeric vector or a time series. |
k |
Integer, window length. |
A numeric vector.
coreinf_br %>%
dplyr::select(-date) %>%
purrr::map_df(~mavc(.x, 25)) %>%
tibble::add_column(date = coreinf_br$date, .before = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.