This help topic is for R version 0.90. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/splines/html/predict.bs.html
predict.bs {splines}R Documentation

Evaluate a predefined spline basis at new values

Usage

predict.bs(object, newx, ...)
predict.ns(object, newx, ...)

Arguments

object

the result of a call to bs() or ns() having attributes describing knots, degree, etc.

newx

the x values at which evaluations are required.

...

Optional additional arguments. Presently no additional arguments are used.

Value

an object just like basis, except evaluated at the new values of x.

These are methods for the function predict() for objects inheriting from classes bs or ns. See predict for the general behavior of this function.

See Also

bs, ns, poly, lo, s

Examples

library(splines)
data(women)
basis <- ns(women$height, df = 5)
newX <- seq(58, 72, len = 51)
# evaluate the basis at the new data
predict(basis, newX)

[Package splines version 0.90 ]