powered by
This function calculates the moving average of a time series.
moving_average(timeseries, window)
A vector of doubles (average over the window).
Vector of doubles representing a timeseries.
Double, the time-window to average over (in timesteps).
Marina Papadopoulou m.papadopoulou.rug@gmail.com
bs <- rnorm(20, mean = 10, sd = 1) moving_average(bs, 5)
Run the code above in your browser using DataLab