View source: R/bimets_ts_functions.R
ym2yp | R Documentation |
This function transforms an input variable of class yearmon()
into an equivalent two-dimensional numerical array of type c(YEAR,PERIOD)
.
ym2yp(x = NULL)
x |
Input of class |
This function returns a two-dimensional numerical array of type c(YEAR,PERIOD)
.
date2yp
yq2yp
GETDATE
#day and month names can change depending on locale
Sys.setlocale('LC_ALL','C')
Sys.setlocale('LC_TIME','C')
print(ym2yp(as.yearmon("Dec 2013"))); #print c(2013,12)
print(ym2yp(c(as.yearmon('Jan 2000'),as.yearmon('Dec 1987'),
as.yearmon('Jan 2003'),as.yearmon('Mar 2012'))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.