\HeaderA{tsp}{Tsp Attribute of Time-Series-like Objects}{tsp}
\aliasA{hasTsp}{tsp}{hasTsp}
\aliasA{tsp<\Rdash}{tsp}{tsp<.Rdash.}
\keyword{ts}{tsp}
\begin{Description}\relax
\code{tsp} returns the \code{tsp} attribute (or \code{NULL}).
It is included for compatibility with S version 2. \code{tsp<-}
sets the \code{tsp} attribute. \code{hasTsp} ensures \code{x} has a
\code{tsp} attribute, by adding one if needed.
\end{Description}
\begin{Usage}
\begin{verbatim}
tsp(x)
tsp(x) <- value
hasTsp(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a vector or matrix or univariate or multivariate time-series.
\item[\code{value}] a numeric vector of length 3 or \code{NULL}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{tsp} attribute was previously described here as
\code{c(start(x), end(x), frequency(x))}, but this is incorrect.
It gives the start time \emph{in time units}, the end time and
the frequency.

Assignments are checked for consistency.    

Assigning \code{NULL} which removes the \code{tsp} attribute
\emph{and} any \code{"ts"} class of \code{x}.
\end{Details}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{ts}{ts}}, \code{\LinkA{time}{time}}, \code{\LinkA{start}{start}}.
\end{SeeAlso}

