R/bspline.R

Defines functions bspline

bspline <- function(x, xl, xr, ndx, bdeg){
	dx <- (xr - xl)/ndx
	knots <- seq(xl - bdeg*dx, xr + bdeg*dx, by = dx)
	B <- spline.des(knots, x, bdeg + 1, 0*x)$design
	res <- list(B = B, knots = knots)
	res
}
rominsal/pspatreg documentation built on July 8, 2022, 9:28 p.m.