# S3 method for bs predict(object, newx, …)
# S3 method for ns predict(object, newx, …)
xvalues at which evaluations are required.
object, except evaluated at the new values of
x. These are methods for the generic function
predictfor objects inheriting from classes
predictfor the general behavior of this function.
require(stats) basis <- ns(women$height, df = 5) newX <- seq(58, 72, length.out = 51) # evaluate the basis at the new data predict(basis, newX)