Learn R Programming

bimets (version 4.0.3)

INDEXNUM: Rebase a Time Series

Description

This function rebases an input time series to the value of 100 in the year selected by the BASEYEAR argument. If the input time series frequency is greater than one, the initial reference is set to the average value of the input time series observations that lie in the BASEYEAR.

Usage

INDEXNUM(x=NULL, BASEYEAR=NULL, avoidCompliance=FALSE, ...)

Value

This function returns a BIMETS time series.

Arguments

x

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

BASEYEAR

Rebasing year.

avoidCompliance

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

...

Backward compatibility.

See Also

TSJOIN
TSEXTEND
TSMERGE
MOVAVG
GETYEARPERIOD
CUMSUM

Examples

Run this code
		
	#create yearly ts
	n<-20
	ts1<-TSERIES(1:n,START=c(2000,1),FREQ=1)
	TABIT(ts1, INDEXNUM(ts1,2005))
	
	#quarterly
	ts1<-TSERIES(1:n,START=c(2000,1),FREQ=4)
	ts1[5]<-NA
	TABIT(ts1, INDEXNUM(ts1,2000))

Run the code above in your browser using DataLab