I have got a data.frame where one column represents dates in years and the other column observations of e.g. sea level in mm.
I need to calculate the 10-year smoothed mean.
Here some fake data:
x = rnorm(1:100) #annual sea leavel rise
date = seq(1801,1900) #years from 1801 to 1900
df = data.frame(date,x) #create data.frame
Is there any R function that could help? Is the smoothed mean the same as the moving average?
Thanks for any help and/or suggestion