\Header{na.omit.ts}{NA Handling Routines for Time Series}
\alias{na.contiguous}{na.omit.ts}
\keyword{ts}{na.omit.ts}
\begin{Description}\relax
For \code{na.omit.ts}, initial and final segments with missing
values in one or more of the series are omitted. `Internal'
missing values will lead to failure.

For \code{na.contiguous} the longest consecutive stretch of
non-missing values is used. (In the event of a tie, the first such
stretch.)\end{Description}
\begin{Usage}
\begin{verbatim}
na.contiguous(frame)
na.omit.ts(frame)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{frame}] a univariate or multivariate time series.
\end{ldescription}
\end{Arguments}
\begin{Value}
A time series without missing values. The class of \code{frame} will
be preserved.\end{Value}
\begin{Author}\relax
B. D. Ripley\end{Author}
\begin{SeeAlso}\relax
\code{\Link{na.omit}}, \code{\Link{na.fail}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(BJsales)
sales1 <- ts.union(BJsales, lead3 = lag(BJsales.lead, -3))
na.omit.ts(sales1)

data(presidents)
na.contiguous(presidents)
\end{ExampleCode}
\end{Examples}

