trim.na {tframe} | R Documentation |
Trim NAs from the start and end of a time series object.
trim.na(x, ...) trim.na(x, start.=T, end.=T)
obj |
A time series matrix or an object of class TSdata. |
start. |
If start.=F then beginning NAs are not trimmed. |
end. |
If end.=F then ending NAs are not trimmed. |
Trim NAs from the ends of a time series object. Observations in a given period for all series are dropped if any one contains an NA.
A time series object which is windowed to the subset of data which is not NAs (usually the available data).
trim.na(ts(rbind(NA, matrix(1:20,10,2)), start=c(1980,1), frequency=12))