This help topic is for R version 1.5.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/ts/html/na.contiguous.html
na.contiguous {ts}R Documentation

NA Handling Routines for Time Series

Description

Find the longest consecutive stretch of non-missing values in a time series object. (In the event of a tie, the first such stretch.)

Usage

na.contiguous(frame)

Arguments

frame

a univariate or multivariate time series.

Value

A time series without missing values. The class of frame will be preserved.

Author(s)

B. D. Ripley

See Also

na.omit and na.omit.ts; na.fail

Examples

data(presidents)
na.contiguous(presidents)