yearmon to Year-Period Conversion
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)
.
#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'))))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.