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

yq2yp

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

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'))))

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.