splineDesigncpp | R Documentation |
Computes the design matrix for B-splines based on the
specified knots
and evaluated at the values in x
.
splineDesigncpp(
knots = NA_real_,
x = NA_real_,
ord = 4L,
derivs = as.integer(c(0))
)
knots |
A numeric vector specifying the positions of the knots, including both boundary and internal knots. |
x |
A numeric vector of values where the B-spline functions
or their derivatives will be evaluated. The values of |
ord |
A positive integer indicating the order of the B-spline.
This corresponds to the number of coefficients in each piecewise
polynomial segment, where |
derivs |
An integer vector specifying the order of derivatives
to be evaluated at the corresponding |
A matrix with dimensions
c(length(x), length(knots) - ord)
. Each row corresponds
to a value in x
and contains the coefficients of the
B-splines, or the specified derivatives, as defined by the
knots
and evaluated at that particular value of x
.
The total number of B-splines is length(knots) - ord
,
with each B-spline defined by a set of ord
consecutive knots.
Kaifeng Lu, kaifenglu@gmail.com
splineDesigncpp(knots = 1:10, x = 4:7)
splineDesigncpp(knots = 1:10, x = 4:7, derivs = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.