Learn R Programming

icpack (version 0.1.0)

bbase: Compute a B-spline basis

Description

Compute a B-spline basis

Usage

bbase(x, xl = min(x), xr = max(x), nseg = 10, deg = 3)

Value

A matrix containing the basis

Arguments

x

The vector of values for which the basis is to be evaluated

xl

The left boundary of the domain

xr

The right boundary of the domain

nseg

The number of inter-knot segments on the domain

deg

The degree of the B-splines (2 means quadratic, 3 means cubic, and so on)

Examples

Run this code
x = runif(100)
B = bbase(x, 0, 1, 20, 3)

Run the code above in your browser using DataLab