spline_curves: Compute one or more tidy spline curves

View source: R/formulas_splines.R

spline_curvesR Documentation

Compute one or more tidy spline curves

Description

Compute one or more tidy spline curves

Usage

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

Arguments

coefficients

Numeric vector or matrix with one coefficient column per curve.

knots, degree, n

Spline-basis arguments.

Value

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

Examples

head(spline_curves(coefficients = c(0.1, 0.2, 0.5, 0.4, 0.7, 0.6, 0.9),
                   knots = c(0.25, 0.5, 0.75), degree = 3, n = 20))

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