spline_basis: Compute tidy B-spline basis functions

View source: R/formulas_splines.R

spline_basisR Documentation

Compute tidy B-spline basis functions

Description

Compute tidy B-spline basis functions

Usage

spline_basis(knots = c(0.25, 0.5, 0.75), degree = 3L, n = 1000L)

Arguments

knots

Interior knots between zero and one.

degree

Polynomial degree.

n

Number of evaluation points.

Value

A base data.frame with one row per x/basis combination and columns x, basis, and value.

Examples

head(spline_basis(knots = c(0.25, 0.5, 0.75), degree = 3, n = 20))

simulab documentation built on Oct. 15, 2026, 5:08 p.m.