There's a small issue with tsibble::yearmonth
. See this list of year - months values:
x <- c("2016.09", "2016.10", "2016.11", "2016.12")
When I call tsibble::yearmonth
(tsibble
version 1.0.0), I obtain this:
tsibble::yearmonth(x)
<yearmonth[4]>
[1] "2016 Sep" "2016 Oct" "2016 Jan" "2016 Feb"
The function has correctly transformed September and October, but makes an error with November and December.
Workaround exists, e.g.:
tsibble::yearmonth(as.Date(paste0(x, ".01"), format = "%Y.%m.%d"))
<yearmonth[4]>
[1] "2016 Sep" "2016 Oct" "2016 Nov" "2016 Dec"
but it would be nice if yearmonth()
recognizes the date properly.