tidyverts / tsibble

Tidy Temporal Data Frames and Tools
https://tsibble.tidyverts.org
GNU General Public License v3.0
527 stars 49 forks source link

Error in `stop_vctrs()`: ! <interval> + <integer> is not permitted #278

Closed Steviey closed 1 year ago

Steviey commented 2 years ago

R latest, Win 7, fable-stuff latest.

Since several months I can't use autoplot() anymore. This is what happens...

suppressPackageStartupMessages(library(tidyverse)) 
suppressPackageStartupMessages(library(fabletools))
suppressPackageStartupMessages(library(tsibble))
suppressPackageStartupMessages(library(feasts))

sourceTsibble<-tsibbledata::vic_elec

myPlot1<-sourceTsibble %>%
    index_by(time=tsibble::yearmonth(lubridate::floor_date(Date,'1 day'))) %>%
    summarise(Temperature=sum(Temperature)) %>% 
    tsibble::fill_gaps(Temperature = 0) %>% autoplot()

Error in `stop_vctrs()`:
! <interval> + <integer> is not permitted

fabletools:::autoplot.tbl_ts(.)
 13. inum:::format.interval(interval(object))
 14. vctrs:::`+.vctrs_vctr`(x, 1L)
 16. vctrs:::vec_arith.default("+", e1, e2)
 17. vctrs::stop_incompatible_op(op, x, y)
 18. vctrs:::stop_incompatible(...)
 19. vctrs:::stop_vctrs(...)
R

I believe I saw this first, when forecast became a generic function. I also read this, but I'm loading only standard packages, see above... https://community.rstudio.com/t/gg-tsresiduals-not-working/69568

Sessioninfo:

R version 4.0.5 (2021-03-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] R6018_0.1.0 forecast_8.16 Hmisc_4.5-0
[4] Formula_1.2-4 survival_3.2-11 lubridate_1.8.0
[7] caret_6.0-88 lattice_0.20-44 runner_0.4.1
[10] rstatix_0.7.0 mlr_2.19.0 ParamHelpers_1.14
[13] progressr_0.10.0 tibbletime_0.1.6 data.table_1.14.0
[16] scales_1.1.1 arules_1.7-2 dbplyr_2.1.1
[19] feasts_0.2.2 tsibble_1.1.1 fabletools_0.3.2.9000 [22] timetk_2.7.0 lobstr_1.1.1 plotly_4.10.0
[25] ggExtra_0.9 forcats_0.5.1 stringr_1.4.0
[28] dplyr_1.0.7 purrr_0.3.4 readr_1.4.0
[31] tibble_3.1.6 ggplot2_3.3.5 tidyverse_1.3.1
[34] freqdist_0.1 tidyr_1.1.4 RSQLite_2.2.7
[37] digest_0.6.29 matrixStats_0.58.0 Matrix_1.3-3

loaded via a namespace (and not attached): [1] ModelMetrics_1.2.2.2 R.methodsS3_1.8.1 shapper_0.1.3
[4] earth_5.3.0 bit64_4.0.5 knitr_1.33
[7] multcomp_1.4-17 R.utils_2.10.1 rpart_4.1-15
[10] hardhat_0.1.6 generics_0.1.2 GPfit_1.0-8
[13] rules_0.1.1 TH.data_1.0-10 future_1.21.0
[16] bit_4.0.4 httpuv_1.6.1 xml2_1.3.2
[19] ggsci_2.9 StanHeaders_2.21.0-7 assertthat_0.2.1
[22] fable_0.3.1.9000 gower_0.2.2 xfun_0.21
[25] hms_1.1.0 promises_1.2.0.1 fansi_1.0.2
[28] anytime_0.3.9 progress_1.2.2 readxl_1.3.1
[31] DBI_1.1.1 quantmod_0.4.18 htmlwidgets_1.5.3
[34] Quandl_2.10.0 stats4_4.0.5 ellipsis_0.3.2
[37] backports_1.2.1 RcppParallel_5.1.5 libcoin_1.0-8
[40] vctrs_0.3.8 remotes_2.3.0 TTR_0.24.2
[43] abind_1.4-5 cachem_1.0.5 withr_2.4.3
[46] ggforce_0.3.3 checkmate_2.0.0 xts_0.12.1
[49] prettyunits_1.1.1 parsnip_0.1.7 cluster_2.1.2
[52] lazyeval_0.2.2 urca_1.3-0 crayon_1.4.2
[55] recipes_0.1.17 pkgconfig_2.0.3 tweenr_1.0.2
[58] nlme_3.1-152 nnet_7.3-16 rlang_1.0.1
[61] globals_0.14.0 miniUI_0.1.1.1 lifecycle_1.0.1
[64] sandwich_3.0-1 ingredients_2.2.0 modelr_0.1.8
[67] cellranger_1.1.0 distributional_0.3.0 modeltime_1.1.1.9000
[70] Cubist_0.2.40 polyclip_1.10-0 emayili_0.4.10
[73] lmtest_0.9-38 partykit_1.2-13 yardstick_0.0.8
[76] carData_3.0-4 zoo_1.8-9 reprex_2.0.0
[79] base64enc_0.1-3 ggridges_0.5.3 png_0.1-7
[82] viridisLite_0.4.0 R.oo_1.24.0 texreg_1.37.5
[85] pROC_1.17.0.1 blob_1.2.1 tune_0.1.6
[88] workflows_0.2.4 coin_1.4-1 parallelly_1.25.0
[91] jpeg_0.1-8.1 memoise_2.0.0 magrittr_2.0.2
[94] plyr_1.8.6 compiler_4.0.5 miscTools_0.6-26
[97] tinytex_0.31 RColorBrewer_1.1-2 plotrix_3.8-1
[100] fitdistrplus_1.1-3 cli_3.1.0 DiceDesign_1.9
[103] listenv_0.8.0 htmlTable_2.2.1 PerformanceAnalytics_2.0.4 [106] MASS_7.3-54 mgcv_1.8-35 tidyselect_1.1.1
[109] stringi_1.6.2 tsibbledata_0.3.0 tseries_0.10-48
[112] yaml_2.2.1 latticeExtra_0.6-29 grid_4.0.5
[115] fastmatch_1.1-0 tools_4.0.5 rio_0.5.26
[118] parallel_4.0.5 rstudioapi_0.13 foreach_1.5.1
[121] foreign_0.8-81 inum_1.0-4 lightgbm_3.2.1
[124] gridExtra_2.3 prodlim_2019.11.13 C50_0.1.4
[127] farver_2.1.0 shiny_1.7.1 pracma_2.3.6
[130] ggformula_0.10.1 lava_1.6.9 party_1.3-7
[133] quadprog_1.5-8 TeachingDemos_2.12 Rcpp_1.0.8
[136] car_3.0-10 broom_0.7.10 prophet_1.0
[139] later_1.2.0 greybox_1.0.5.41001 httr_1.4.2
[142] ggstance_0.3.5 colorspace_2.0-2 rvest_1.0.0
[145] fs_1.5.0 reticulate_1.20 splines_4.0.5
[148] statmod_1.4.36 vip_0.3.2 correlationfunnel_0.2.0
[151] xtable_1.8-4 jsonlite_1.7.3 nloptr_2.0.0
[154] tidymv_3.2.1 BBmisc_1.11 strucchange_1.5-2
[157] timeDate_3043.102 plotmo_3.6.0 modeltools_0.2-23
[160] tidyquant_1.0.3 DALEX_2.4.0 ipred_0.9-12
[163] R6_2.5.1 lhs_1.1.1 pillar_1.7.0
[166] htmltools_0.5.2 mime_0.12 glue_1.6.1
[169] fastmap_1.1.0 DT_0.18 class_7.3-19
[172] codetools_0.2-18 tsfeatures_1.0.2 mvtnorm_1.1-1
[175] furrr_0.2.2 utf8_1.2.2 dials_0.0.10
[178] curl_4.3.1 modelStudio_3.0.0 lamW_2.1.1
[181] waldo_0.3.1 ggfortify_0.4.14 zip_2.1.1
[184] openxlsx_4.2.3 parallelMap_1.5.0 smooth_3.1.6.41006
[187] munsell_0.5.0 rsample_0.1.0 iterators_1.0.13
[190] labelled_2.8.0 haven_2.4.1 fracdiff_1.5-1
[193] reshape2_1.4.4 mosaicCore_0.9.0 gtable_0.3.0
[196] baguette_0.1.0

earowang commented 1 year ago

Looks like it's fixed in {feasts}.