toolTimeSpline: Smooth a magclass time series with optional anchor years

View source: R/toolTimeSpline.R

toolTimeSplineR Documentation

Smooth a magclass time series with optional anchor years

Description

Smooths 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.

Usage

toolTimeSpline(x, dof = 5, peggedYears = NULL, anchorFactor = 10)

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.

Value

A magclass object of the same shape, with each time series spline-smoothed.

Author(s)

Kristine Karstens, Felicitas Beier, Michael Crawford

See Also

Other temporal processing: toolFillYears(), toolTimeAverage()


madrat documentation built on July 2, 2026, 9:09 a.m.