Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

TSINFO

Get Time Series Info


Description

This function returns detailed information about the input time series list. Requested information is defined in the argument MODE.

Usage

TSINFO(..., MODE = NULL, avoidCompliance=FALSE)

Arguments

...

Input time series list. Each time series must satisfy the compliance control check defined in is.bimets.

MODE

Select the information to be retrieved from the list of time series. MODE can be set to:
STARTY: the output will be a numerical array built with the starting year of each time series in the input list.
ENDY: the output will be a numerical array built with the ending year of each time series in the input list.
STARTP: the output will be a numerical array built with the starting period of each time series in the input list.
ENDP: the output will be a numerical array built with the ending period of each time series in the input list.
START: the output will be a numerical array built with the value
x=START_YEAR+START_PERIOD/FREQ calculated on each time series in the input list, where FREQ is the time series frequency.
END: the output will be a numerical array built with the value
x=END_YEAR+END_PERIOD/FREQ calculated on each time series in the input list.
START2: the output will be a numerical matrix. For each time series in the input list the matrix will have a row=c(START_YEAR,START_PERIOD) with related values.
END2: the output will be a numerical matrix. For each time series in the input list the matrix will have a row=c(END_YEAR,END_PERIOD) with related values.
FREQ: the output will be a numerical array built with the frequency of each time series in the input list.
FACTOR: the output will be a numerical array built with the SCALEFAC metadata value of each time series in the input list.
UNITS: the output will be a string array built with the UNITS metadata string of each time series in the input list.
TITLE: the output will be a string array built with the TITLE metadata string of each time series in the input list.
SOURCE: the output will be a string array built with the SOURCE metadata string of each time series in the input list.

avoidCompliance

If TRUE, compliance control check of input time series will be skipped. See is.bimets

Value

This function returns an array built with requested information about the input time series list. In the case of MODE=START2 or MODE=END2 the output will be of class matrix().

See Also

Examples

#create ts
	ts1=TIMESERIES(INTS(1,10),START=c(2004,2),FREQ=2,
	UNITS='myUnits',TITLE='myTitle',SOURCE='mySource')
	ts2=TIMESERIES(INTS(1,20),START=c(2006,3),FREQ=4,SCALEFAC=1)
	ts3=TIMESERIES(INTS(1,30),START=c(2008,7),FREQ=12)
	
	print(TSINFO(ts1,ts2,ts3,MODE='STARTY')) #print ... c(2004,2006,2008)
	print(TSINFO(ts1,ts2,ts3,MODE='ENDP')) #print ... c(1,2,12)
	print(TSINFO(ts1,ts2,ts3,MODE='FREQ')) #print ... c(2,4,12)
	
	print(TSINFO(ts1,ts2,ts3,MODE='START2')) 
	#print ... 
	#[,1] [,2]
	#[1,] 2004    2
	#[2,] 2006    3
	#[3,] 2008    7
	
	print(TSINFO(ts1,ts2,ts3,MODE='END')) #print ... c(2009.5, 2011.5, 2011.0)
	print(TSINFO(ts1,ts2,ts3,MODE='FACTOR')) #print ...  c(0,1,0)
	print(TSINFO(ts1,ts2,ts3,MODE='UNITS')) #print ...  c('myUnits','','')

bimets

Time Series and Econometric Modeling

v1.5.3
GPL-3
Authors
Andrea Luciani [aut, cre], Roberto Stok [aut], Bank of Italy [cph]
Initial release
2021-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.