| media_movel | R Documentation |
Calculate moving averages
media_movel(
x,
janela = 7L,
alinhamento = c("direita", "centro", "esquerda"),
parcial = FALSE,
na_rm = FALSE
)
x |
Numeric vector. |
janela |
Positive window size. |
alinhamento |
Window alignment: '"direita"', '"centro"' or '"esquerda"'. |
parcial |
Whether edge windows may contain fewer than 'janela' observations. |
na_rm |
Whether missing values should be removed within each window. |
A numeric vector of the same length as 'x'.
media_movel(1:7, janela = 3)
media_movel(c(1, NA, 3, 4), janela = 2, na_rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.