na.contiguous {timeSeries} | R Documentation |
Find longest contiguous stretch of non-NAs
Description
Find the longest consecutive stretch of non-missing values in a
"timeSeries"
object. (In the event of a tie, the first such
stretch.)
Usage
## S4 method for signature 'timeSeries'
na.contiguous(object, ...)
Arguments
object |
a |
... |
further arguments passed to other methods. |
Value
a "timeSeries"
object without missing values
Examples
## Dummy 'timeSeries' with NAs entries
data <- matrix(sample(c(1:20, rep(NA,4))), ncol = 2)
s <- timeSeries(data, timeCalendar())
## Find the longest consecutive non-missing values
na.contiguous(s)
[Package timeSeries version 4030.106 Index]