yq2yp {bimets}R Documentation

yearqtr to Year-Period Conversion

Description

This function transforms an input variable of class yearqtr() into an equivalent two-dimensional numerical array of type c(YEAR,PERIOD).

Usage

yq2yp(x = NULL)

Arguments

x

Input of class yearmon()

Value

This function returns a two-dimensional numerical array of type c(YEAR,PERIOD).

See Also

date2yp
ym2yp
GETDATE

Examples

	
  #day and month names can change depending on locale
  Sys.setlocale('LC_ALL','C')
  Sys.setlocale('LC_TIME','C')
  
  print(yq2yp(as.yearqtr('2001 Q3'))); #print c(2001,3)
  print(yq2yp(c(as.yearqtr('2000 Q2'),as.yearqtr('1987 Q4'),as.yearqtr('2003 Q1'))))

[Package bimets version 3.0.2 Index]