calculate the moving average of a dataseries
moving.average(x, n = 5)
x | (vector). Vector containing the data that for which the average needs to be calculated. |
---|---|
n | (integer). Number of values for which the average needs to be calculated. |
vector. Data vector containing the averages. This vector is as long as the input (and thus contains NA's)