hanning {dplR} | R Documentation |
Applies a Hanning filter of length n to x.
hanning(x,n=7)
x |
a vector |
n |
length of the hanning filter, defaults to 7 |
This applies a low frequency Hanning filter to x with weight set to n.
A filtered vector.
Andy Bunn
Oppenheim, A.V., Schafer, R.W., and Buck, J.R. (1999) Discrete-Time Signal Processing (2nd Edition). Prentice-Hall. ISBN-13: 978-0137549207.
data(ca533) yrs=as.numeric(rownames(ca533)) y=ca533[,1] yrs=yrs[!is.na(y)] y=y[!is.na(y)] plot(yrs,y,xlab='Years',ylab='Series1 (mm)') lines(yrs,hanning(y,n=9),col='red',lwd=2) lines(yrs,hanning(y,n=21),col='blue',lwd=2)