moving_av | R Documentation |
This function calculates a moving average of a vector for smoothing data (e.g. time series).
moving_av(x, window = 5)
x |
Vector for which to calculate moving average. |
window |
Width of the window for the moving average. Number of neighboring values that will be averaged at each position of x. |
moving_av(x = rnorm(100), window = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.