x: A numeric vector representing the predictor variable.
df: Degrees of freedom, specifying the number of columns in the basis matrix. If df is provided, the function automatically selects df - degree - intercept internal knots based on appropriate quantiles of x, ignoring any missing values.
knots: A numeric vector specifying the internal breakpoints that define the spline. If not provided, df must be specified.
degree: An integer specifying the degree of the piecewise polynomial. The default value is 3, which corresponds to cubic splines.
intercept: A logical value indicating whether to include an intercept in the basis. The default is FALSE.
boundary_knots: A numeric vector of length 2 specifying the boundary points where the B-spline basis should be anchored. If not supplied, the default is the range of non-missing values in x.
warn_outside: A logical value indicating whether a warning should be issued if any values of x fall outside the specified boundary knots.
Returns
A matrix with dimensions c(length(x), df). If df is provided, the matrix will have df columns. Alternatively, if knots are supplied, the number of columns will be length(knots) + degree + intercept. The matrix contains attributes that correspond to the arguments passed to the bscpp function.