fourier.smooth: Fourier basis for mgcv

fourier.smoothR Documentation

Fourier basis for mgcv

Description

A mgcv-style smooth constructor for Fourier bases, used internally by tfb_spline() when bs = "fourier".

Usage

## S3 method for class 'fourier.smooth.spec'
smooth.construct(object, data, knots)

## S3 method for class 'fourier.smooth'
Predict.matrix(object, data)

Arguments

object

a fitted fourier.smooth object.

data

a list containing the data vector for prediction.

knots

not used.

Value

a smooth specification object with the Fourier basis matrix X and optional second-derivative penalty S.

a design matrix evaluated at the new data points.

Examples


# used internally via tfb_spline:
f <- c(sin(2 * pi * (0:100) / 100), cos(2 * pi * (0:100) / 100))
tf_smooth <- tfb_spline(f, bs = "fourier", k = 11)


tf documentation built on April 7, 2026, 5:07 p.m.