Trim a Time Series
This function removes trailing or leading missing values NA
from the input array or the input time series. Users can provide the value to be removed other than NA
missing vallue by using the argument VALUE
.
TSTRIM(x=NULL, VALUE=NA, TRAIL=TRUE, LEAD=TRUE, avoidCompliance=FALSE, ...)
x |
Input numerical array or time series that must satisfy the compliance control check defined in |
VALUE |
Target value to be removed. Default to missing value |
TRAIL |
If |
LEAD |
If |
avoidCompliance |
If |
... |
Backward compatibility. |
This function returns an object of the same class of the input, i.e. an array or a BIMETS time series, built by removing leading and trailing user-defined values.
#TS A n=10 ts1=TSERIES(c(NA,1:n,NA),START=c(2000,1),FREQ='A') TABIT(ts1,TSTRIM(ts1)) ts1=TSERIES(c(NA,1:n,NA),START=c(2000,1),FREQ='A') TABIT(ts1,TSTRIM(ts1,TRAIL=FALSE)) ts1=TSERIES(c(NA,1:n,NA),START=c(2000,1),FREQ='A') TABIT(ts1,TSTRIM(ts1,LEAD=FALSE)) ts1=TSERIES(c(0,0,NA,1:n,NA,0),START=c(2000,1),FREQ='A') TABIT(ts1,TSTRIM(ts1,0))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.