TSPROJECT {bimets} | R Documentation |
Project a Time series
Description
This function projects the input time series into a time interval. The output class can be either a time series (default) or a one-dimensional array if the argument ARRAY=TRUE
.
Usage
TSPROJECT(x=NULL, TSRANGE=NULL, ARRAY=FALSE,
EXTEND=FALSE, avoidCompliance=FALSE,...)
Arguments
x |
Input time series that must satisfy the compliance control check defined in |
TSRANGE |
Date range of data projection. |
ARRAY |
If |
EXTEND |
If |
avoidCompliance |
If |
... |
Backward compatibility. |
Value
This function returns a BIMETS time series, or a numerical array if the argument ARRAY=TRUE
, built by projecting the input time series into the provided TSRANGE
.
See Also
TSJOIN
TSEXTEND
TSMERGE
MOVAVG
GETYEARPERIOD
CUMSUM
TSTRIM
Examples
#create yearly ts
ts1<-TSERIES((1:10),START=c(2000,1),FREQ=1)
print(TSPROJECT(ts1,TSRANGE=c(2002,1,2005,1))) #print projected ts from 2002 to 2005
print(TSPROJECT(ts1,TSRANGE=c(2001,1,2004,1),ARRAY=TRUE)) #print c(2,3,4,5)
print(TSPROJECT(ts1,TSRANGE=c(1998,1,2002,1),EXTEND=TRUE,ARRAY=TRUE))
#print c(NA,NA,1,2,3)