GETRANGE {bimets} | R Documentation |
Time Series Common Range
Description
Given a time series list, this function returns intersection or union of time series' ranges.
Usage
GETRANGE( x=list(),
type='INNER',
avoidCompliance=FALSE,
...)
Arguments
x |
Input list, having elements as time series of class |
type |
If |
avoidCompliance |
If |
... |
Backward compatibility. |
Value
This function returns the common range of the input time series as a 4-integer array built by c(START_Y,START_P,END_Y,END_P)
. If type='INNER'
and there is no intersection of time series' ranges, then this function will return a NULL
.
See Also
TSJOIN
TSEXTEND
TSMERGE
MOVAVG
GETYEARPERIOD
CUMSUM
Examples
#create ts
ts1=TSERIES((1:40), START=c(2000,1), FREQ=4)
ts2=TSERIES((1:40), START=c(2001,1), FREQ=4)
ts3=TSERIES((1:40), START=c(2002,1), FREQ=4)
myList=list(ts1,ts2,ts3)
print(GETRANGE(myList))
print(GETRANGE(myList,type='OUTER'))