moving_average {swaRmverse} | R Documentation |
Moving Average
Description
This function calculates the moving average of a time series.
Usage
moving_average(timeseries, window)
Arguments
timeseries |
Vector of doubles representing a timeseries. |
window |
Double, the time-window to average over (in timesteps). |
Value
A vector of doubles (average over the window).
Author(s)
Marina Papadopoulou m.papadopoulou.rug@gmail.com
Examples
bs <- rnorm(20, mean = 10, sd = 1)
moving_average(bs, 5)
[Package swaRmverse version 0.1.0 Index]