View source: R/moving_average.R
moving_average | R Documentation |
This function calculates the moving average of a time series.
moving_average(timeseries, window)
timeseries |
Vector of doubles representing a timeseries. |
window |
Double, the time-window to average over (in timesteps). |
A vector of doubles (average over the window).
Marina Papadopoulou m.papadopoulou.rug@gmail.com
bs <- rnorm(20, mean = 10, sd = 1)
moving_average(bs, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.