NUMPERIOD {bimets}R Documentation

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. It must be a positive integer.

Value

This function returns an integer of class numeric.

See Also

normalizeYP
frequency
GETDATE
LOCS
NAMELIST

Examples


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

[Package bimets version 3.0.2 Index]