inst/examples/ex-update.R

library(splines2)

x <- seq.int(0, 1, 0.01)
knots <- c(0.3, 0.5, 0.6)

## quadratic B-splines
bsMat2 <- bSpline(x, knots = knots, degree = 2, intercept = TRUE)

## cubic B-splines
bsMat3 <- update(bsMat2, degree = 3)

Try the splines2 package in your browser

Any scripts or data that you put into this service are public.

splines2 documentation built on Aug. 20, 2023, 1:07 a.m.