data(nao, package="ocedata")
plot(nao$year, nao$index, xlab="Year", ylab="NAO index", type="l", col="gray")
k <- kernel("fejer", m=25, r=2)
smoothed <- kernapply(nao$index, k, circular=TRUE)
lines(nao$year, smoothed, col=2)
Run the code above in your browser using DataLab