\HeaderA{cSplineDes}{Evaluate cyclic B spline basis}{cSplineDes}
\keyword{models}{cSplineDes}
\keyword{smooth}{cSplineDes}
\keyword{regression}{cSplineDes}
\begin{Description}\relax
Uses \code{splineDesign} to set up the model matrix for a cyclic B-spline basis.
\end{Description}
\begin{Usage}
\begin{verbatim}
cSplineDes(x, knots, ord = 4)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] covariate values for smooth.
\item[\code{knots}] The knot locations: the range of these must include all the data.
\item[\code{ord}] order of the basis. 4 is a cubic spline basis. Must be >1.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The routine is a wrapper that sets up a B-spline basis, where the basis functions wrap at the first and 
last knot locations.
\end{Details}
\begin{Value}
A matrix with \code{length(x)} rows and \code{length(knots)-1} columns.
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon.wood@r-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{cyclic.p.spline}{cyclic.p.spline}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 x <- 0:100/100;k<- 0:5/5
 X <- cSplineDes(x,k)
 plot(x,X[,1],type="l"); for (i in 2:5) lines(x,X[,i],col=i)
\end{ExampleCode}
\end{Examples}

