This function calculates a moving average.
Usage
movingAverage(x, n = 2, centered = FALSE)
Arguments
- x
The vector
- n
The number of samples
- centered
If FALSE, then average current sample and previous (n-1) samples. If TRUE, then average symmetrically in past and future. (If n is even, use one more sample from future.) the colnames they should be changed to
Value
data with fixed colnames