View source: R/bimets_ts_functions.R
TSTRIM | R Documentation |
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 value 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.
TSLAG
TSJOIN
TSMERGE
TSPROJECT
CUMSUM
INDEXNUM
#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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.