bs2f | R Documentation |
Computes the second order basis function for a set of values at a given set of knots.
bs2f(x, x0)
x |
set of values |
x0 |
set of knots |
## set of knots
x0 <- 0:5
## set of points to evaluate
x1 <- seq(0, 5, 0.1)
B <- bs2f(x1, x0)
plot(x1, B[,1], type='n', xlab='x', ylab='f(x)')
for (j in 1:ncol(B)) lines(x1, B[,j])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.