Smooth a magclass time series with optional anchor years
Source:R/toolTimeSpline.R
toolTimeSpline.RdSmooths a magclass time series using spline approximation with the given degrees of freedom. Optionally, specific years can be "pegged" (anchored) to stay close to their original values during smoothing. Anchoring is enforced by applying high weights to those years.
Arguments
- x
A magclass object.
- dof
Degrees-of-freedom per 100 years (higher -> more degrees of freedom, less smoothing; default 5).
- peggedYears
Integer vector of years (e.g. `c(2020, 2050, 2100)`) to anchor during smoothing; NULL for none (default).
- anchorFactor
Numeric multiplier for anchor weights (default 10); larger values more strongly enforce pegging.
See also
Other temporal processing:
toolFillYears(),
toolTimeAverage()