\Header{interpSpline}{Create an Interpolation Spline}
\alias{interpSpline.default}{interpSpline}
\alias{interpSpline.formula}{interpSpline}
\keyword{models }{interpSpline}
\begin{Usage}
\begin{verbatim}
interpSpline(obj1, obj2, bSpline, period, na.action)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{obj1}] Either a numeric vector of \texttt{x} values or a formula.
\item[\texttt{obj2}] If \texttt{obj1} is numeric this should be a numeric vector
of the same length.  If \texttt{obj1} is a formula this can be an
optional data frame in which to evaluate the names in the formula.
\item[\texttt{bSpline}] If \texttt{TRUE} the b-spline representation is returned,
otherwise the piecewise polynomial representation is returned.
Defaults to \texttt{FALSE}.
\item[\texttt{period}] An optional positive numeric value giving a period for a
periodic interpolation spline.
\item[\texttt{na.action}] a optional function which indicates what should happen
when the data contain \texttt{NA}s.  The default action
(\texttt{na.omit}) is to omit any incomplete observations.  The
alternative action \texttt{na.fail} causes \texttt{interpSpline} to print
an error message and terminate if there are any incomplete
observations.
\end{ldescription}
\end{Arguments}
\begin{Description}
Create an interpolation spline, either from \texttt{x} and
\texttt{y} vectors, or from a formula/data.frame combination.\end{Description}
\begin{Value}
An object that inherits from class \texttt{spline}. The object can be in
the B-spline representation, in which case it will be of class
\texttt{nbSpline} for natural B-spline, or in the piecewise polynomial
representation, in which case it will be of class \texttt{npolySpline}.\end{Value}
\begin{Author}
Douglas Bates and Bill Venables\end{Author}
\begin{SeeAlso}
\texttt{\Link{splineKnots}},
\texttt{\Link{splineOrder}},
\texttt{\Link{periodicSpline}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data( women )
ispl <- interpSpline( women$height, women$weight )
ispl2 <- interpSpline( weight ~ height,  women )
# ispl and ispl2 should be the same
plot( predict( ispl, seq( 55, 75, len = 51 ) ) )
plot( ispl )    # plots over the range of the knots
splineKnots( ispl )
\end{ExampleCode}
\end{Examples}

