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

Find Longest Contiguous Stretch of non-NAs

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(object, ...)

Arguments

object

a univariate or multivariate time series.

...

further arguments passed to or from other methods.

Value

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

See Also

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

Examples

na.contiguous(presidents)

[Package stats version 2.9.0 ]