bspline <- function(x, xl, xr, ndx, bdeg){
dx <- (xr - xl)/ndx
knots <- seq(xl - bdeg*dx, xr + bdeg*dx, by=dx)
B <- splines::spline.des(knots, x, bdeg+1, 0*x)$design
res <- list(B = B, knots = knots)
res
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.