Create an interpolation spline, either from x
and y
vectors (default
method), or from a formula
/ data.frame
combination (formula
method).
1 2 
obj1 
either a numeric vector of 
obj2 
if 
bSpline 
if 
period 
an optional positive numeric value giving a period for a periodic interpolation spline. 
na.action 
a optional function which indicates what should happen
when the data contain 
sparse 
logical passed to the underlying

An object that inherits from (S3) class spline
. The object can be in
the Bspline representation, in which case it will be of class
nbSpline
for natural Bspline, or in the piecewise polynomial
representation, in which case it will be of class npolySpline
.
Douglas Bates and Bill Venables
splineKnots
,
splineOrder
,
periodicSpline
.
1 2 3 4 5 6 7 8 9  require(graphics); require(stats)
ispl < interpSpline( women$height, women$weight )
ispl2 < interpSpline( weight ~ height, women )
# ispl and ispl2 should be the same
plot( predict( ispl, seq( 55, 75, length.out = 51 ) ), type = "l" )
points( women$height, women$weight )
plot( ispl ) # plots over the range of the knots
points( women$height, women$weight )
splineKnots( ispl )

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.