[R] Moving Average Non Uniform Vectors

Luca Cerone luca.cerone at gmail.com
Thu Mar 27 17:35:14 CET 2014


Dear all,
I have a vector x and a vector y = f(x).
e.g.

x = c(0,1, 3,3.4, 5, 10, 11.23)
y = x**2 + rnorm(length(x))

I would like to apply a moving average to y, knowing that the x values
are not uniformly spaced. How can I do this in R?
What alternatives I have to filter out the noise from Y??

Thanks in advance for the help!




Luca Cerone

Tel: +34 692 06 71 28
Skype: luca.cerone



More information about the R-help mailing list