powered by
Gaussian smoothing
rollmean(x, size)
Numeric vector of the same length as x, smoothed.
x
Numeric vector.
Radius of the smoothing (smaller than half of the length of x). If using size = 0, it returns x.
size = 0
(x <- rnorm(10)) rollmean(x, 3)
Run the code above in your browser using DataLab