na.contiguous
Find Longest Contiguous Stretch of non-NAs
Description
Finds the longest contiguous stretch of non-NA values.
Usage
na.contiguous(object, ...)
## Default S3 method:
na.contiguous(object, ...)
## S3 method for class 'ts':
na.contiguous(object, ...)
Arguments
  
| object | any object. Usually the object is a univariate or a multivariate time series. | 
  | ... | additional arguments to be passed to or from future functions. | 
 
Value
-  returns the longest sequence of non-NA values (or rows) in object,
along with an "na.action" attribute of class "omit"
listing the positions of the omitted values (or rows).
-  returns the object if no NA values are in the object.
 
See Also
Examples
x <- ts(c(11, 12, 13, NA, 15, 15, 16, 17), freq=4, start=2012.25)
na.contiguous(x)