Description Usage Arguments Value
Smooth vector using moving averages
1 | moving_average(x, n = 5, cyclic = TRUE)
|
x |
- the vector to smooth |
n |
- the number of points to use for smoothing. Must be odd. |
cyclic |
- logical indicating whether to treat the vector as cyclic |
A vector of centered averages of size n. If cyclic=TRUE, it is the same length as vector x and the last elements are averages of first and last elements (cyclical overflow).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.