x = bspline(nbasis = 10, extend = FALSE)
plot(x)
plot(x, nderiv = 1)
plot(x, kcol = "grey") # plot vertical lines at knots
# extend knots passed rangeval
x2 = bspline(nbasis = 10, extend = TRUE)
plot(x2, kcol = "grey")
# compare to plot.fd
if (requireNamespace("fda", quietly = TRUE)) {
x3 = fda::create.bspline.basis(nbasis = 10)
par(mfrow = c(2, 1))
plot(x, kcol = "grey")
title("plot.hero_bspline")
}
plot(x3)
title("plot.fd")
Run the code above in your browser using DataLab