tsibble
tsibble copied to clipboard
Is it possible to support other date-time classes as indices other than yearmonth/yearquarter?
Currently tsibble only supports native date-time classes and tsibble's internally defined classes (yearweek, yearmonth, yearquarter). The problem is only packages from tidyverts recognises these date-time classes. For example, ggplot2 does not recognise yearmonth natively without specifying scale_x_yearmonth. Furthermore, as yearmonth/yearquarter stores values as integers internally rather than fractions of the year (year plus 0 for January, 1/12 for February, 2/12 for March and so on), it is very hard to convert tsibble to ts or zoo objects and makes it prohibitive to interoperate with other time series packages.
What's better to expect:
tsibbleworks just liketibblewithout additional caution (works withggplot2and othertidyverseoperations smoothly) only with enhanced time series features.tsibbleworks withzoo::yearmonorzoo::yearqtras time indices. This will maketsibblemuch more versatile and interoperable.- It would be even better if
tsibbleprovides functions to coerce to and from non-tidy time series class (e.g.ts).
FYI:
- {tsibble} supports
zoo::yearmonandzoo::yearqtr. as_tsibble()handles the coercion oftsto a tsibble, andas.ts()vice versa. The {tsbox} package provides more functions to coerce between time series classes.