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

NUMPERIOD

Distance Between Two Year-Periods


Description

This function returns the number of time periods that lie between the provided starting period x1=c(YEAR1,PRD1) and the provided ending period x2=c(YEAR2,PRD2), given a frequency f.

Usage

NUMPERIOD(x1, x2, f = NULL)

Arguments

x1

Starting period specified as a numerical array c(YEAR,PRD)

x2

Ending period specified as a numerical array c(YEAR,PRD)

f

Frequency over the year. Must be a positive integer.

Value

This function returns an integer of class numeric.

See Also

Examples

# f=5, c(3,4) - c(2,3) = 6 periods
	print(NUMPERIOD(c(2,3),c(3,4),5))

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.