ffcsaps {dplR} | R Documentation |
Applies a smoothing spline to y with rigidity nyrs and a frequency response at a wavelength of f.
ffcsaps(y,x=1:length(y),nyrs=length(y)/2,f=0.5)
y |
a vector, typically a tree-ring series. |
x |
a vector with length(y) , typically giving the years of y. |
nyrs |
a number giving the rigidity of the spline, defaults to length(y)/2 . |
f |
a number between 0 and 1 giving the frequency response or wavelength cutoff. |
This applies a smoothing spline similar to the spline applied in most dendrochonological software. See references for more information.
A filtered vector.
DendroLab website: http://dendrolab.org/
Code by DendroLab, University of Nevada Reno, USA and adapted for dplR by Andy Bunn
Cook, E.R. and Kairiukstis, L.A. (1990) Methods of Dendrochronology: Applications in the Environmental Sciences. Springer. ISBN-13: 978-0792305866.
# Use series CAM011 from the Campito dataset data(ca533) series = ca533[,"CAM011"] series=series[!is.na(series)] plot(series,type='l',ylab='Ring Width (mm)',col='grey') lines(ffcsaps(series,nyrs=32),col='red',lwd=2) lines(ffcsaps(series,nyrs=64),col='green',lwd=2) lines(ffcsaps(series,nyrs=128),col='blue',lwd=2) # Use first series from the Mesa Verde dataset data(co021) series = co021[,1] # series=series[!is.na(series)] plot(series,type='l',ylab='Ring Width (mm)',col='grey') lines(ffcsaps(series,nyrs=32),col='red',lwd=2) lines(ffcsaps(series,nyrs=64),col='green',lwd=2) #nyrs defaults to 0.5*length(series) = 347 lines(ffcsaps(series),col='blue',lwd=2)