Closed mbg-unsw closed 2 years ago
Same problem on my end:
x1 <- tsibble::tourism
x2 <- tsibble::tourism
rbind(x1, x2)
Erreur : `levels.yearquarter()` not supported.
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=French_Canada.1252 LC_CTYPE=French_Canada.1252 LC_MONETARY=French_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=French_Canada.1252
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] lubridate_1.7.10 concordance_2.0.0 ggplot2_3.3.5 feasts_0.2.2 vroom_1.5.4 dplyr_1.0.7 fable_0.3.1 fabletools_0.3.1
[9] tsibble_1.0.1 stringr_1.4.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 urca_1.3-0 progressr_0.8.0 pillar_1.6.2 compiler_4.1.0 tools_4.1.0 digest_0.6.27
[8] bit_4.0.4 lattice_0.20-44 nlme_3.1-152 lifecycle_1.0.0 tibble_3.1.3 gtable_0.3.0 anytime_0.3.9
[15] pkgconfig_2.0.3 rlang_0.4.11 cli_3.0.1 parallel_4.1.0 withr_2.4.2 generics_0.1.0 vctrs_0.3.8
[22] nnet_7.3-16 bit64_4.0.5 grid_4.1.0 tidyselect_1.1.1 data.table_1.14.0 glue_1.4.2 R6_2.5.0
[29] fansi_0.5.0 distributional_0.2.2 farver_2.1.0 purrr_0.3.4 tidyr_1.1.3 tzdb_0.1.2 magrittr_2.0.1
[36] scales_1.1.1 ellipsis_0.3.2 colorspace_2.0-2 numDeriv_2016.8-1.1 renv_0.14.0 utf8_1.2.2 stringi_1.7.3
[43] munsell_0.5.0 crayon_1.4.1
thanks, fixed.
Cheers, Earo
On 18 Sep 2021, at 4:00, pollytatouin wrote:
Same problem on my end:
x1 <- tsibble::tourism x2 <- tsibble::tourism rbind(x1, x2) Erreur : `levels.yearquarter()` not supported.
> sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043) Matrix products: default locale: [1] LC_COLLATE=French_Canada.1252 LC_CTYPE=French_Canada.1252 LC_MONETARY=French_Canada.1252 LC_NUMERIC=C [5] LC_TIME=French_Canada.1252 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] lubridate_1.7.10 concordance_2.0.0 ggplot2_3.3.5 feasts_0.2.2 vroom_1.5.4 dplyr_1.0.7 fable_0.3.1 fabletools_0.3.1 [9] tsibble_1.0.1 stringr_1.4.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.7 urca_1.3-0 progressr_0.8.0 pillar_1.6.2 compiler_4.1.0 tools_4.1.0 digest_0.6.27 [8] bit_4.0.4 lattice_0.20-44 nlme_3.1-152 lifecycle_1.0.0 tibble_3.1.3 gtable_0.3.0 anytime_0.3.9 [15] pkgconfig_2.0.3 rlang_0.4.11 cli_3.0.1 parallel_4.1.0 withr_2.4.2 generics_0.1.0 vctrs_0.3.8 [22] nnet_7.3-16 bit64_4.0.5 grid_4.1.0 tidyselect_1.1.1 data.table_1.14.0 glue_1.4.2 R6_2.5.0 [29] fansi_0.5.0 distributional_0.2.2 farver_2.1.0 purrr_0.3.4 tidyr_1.1.3 tzdb_0.1.2 magrittr_2.0.1 [36] scales_1.1.1 ellipsis_0.3.2 colorspace_2.0-2 numDeriv_2016.8-1.1 renv_0.14.0 utf8_1.2.2 stringi_1.7.3 [43] munsell_0.5.0 crayon_1.4.1
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tidyverts/tsibble/issues/256#issuecomment-921908197
What was the reason behind reversing this patch? Somehow this worked for me for at least half a year and started failing after I updated to the current version. Interestingly it errors out somewhere deep inside ggplot. I don't know how it worked before, is it even possible it could've work? Maybe I was casting to tibble somewhere along the process :O
Anyway, why not support binding for tsibbles?
It's not much an issue if all inputs are tsibbles, but I don't think if a tsibble returned by rbind()
is always valid. Anyway, the output of rbind()
is often unpredictable, if inputs are various data classes. For example, the output can be a matrix. I have kept watching how {tibble} addressed the rbind()
issue. And they eventually leave the issue as is ( https://github.com/tidyverse/tibble/pull/909#issuecomment-948033492)
When I use rbind() to append two tsibbles with yearmonth indices, I get this error:
e.g.
The operation works as expected if the index is a plain date.