The bspline
function evaluates ith B-spline basis function of order m at the values in x, given knot locations in k
bspline(x = seq(0, 1, len = 101), k = knots, i = 1, m = 2)
vector or scalar, coordinate where to calculate the B-spline functions
vector of knot locations
integer; from 0 to length(knots)+1-m
integer, degree of the B-Splines
values in x of the ith B-spline basis function of order m
B-splines are defined by recursion : \(b_{i,0}(x) = 1\) if \(k_j \leq x < k_{j+1}\) ; 0 else. $$b_{i,m}(x) = \frac{x-k_i}{k_{i+m}-k_i} b_{i,m-1}(x) + \frac{k_{i+m+1}-x}{k_{i+m+1}-k_{i+1}} b_{i+1,m-1}(x)$$
Wood Simon, 2006. Generalized Additive Models: An Introduction with R Chapman and Hall/CRC.