na.contiguous             package: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(frame)

Arguments:

   frame: a univariate or multivariate time series.

Value:

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

See Also:

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

Examples:

     data(presidents)
     na.contiguous(presidents)

