Description Usage Arguments Details Value
Compute a moving average
1 | mav(x, n)
|
x |
a numeric vector |
n |
size of the window over which to compute the moving average |
The function computes a weighted, centred moving average: each data point is computed as the average of the points around it, with decreasing weights as one moves away from the centre. The original data is padded on the left and on the right to be able to compute moving average values at the extremities.
A numeric vector of the same length as x, with the moving average values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.