robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.13k stars 342 forks source link

snaive Error: evaluation nested too deeply: infinite recursion #824

Closed p-staub closed 4 years ago

p-staub commented 5 years ago

Hi, I sometimes get this error when running snaive multiple times. Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Error during wrapup: evaluation nested too deeply: infinite recursion / options(expressions=)?

The error then appears with any dataset even just running snaive(AirPassengers) gives return the error. Any idea? Thank you

mitchelloharawild commented 5 years ago

I am unable to reproduce this issue.

library(forecast)
#> Registered S3 method overwritten by 'xts':
#>   method     from
#>   as.zoo.xts zoo
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo
#> Registered S3 methods overwritten by 'forecast':
#>   method             from    
#>   fitted.fracdiff    fracdiff
#>   residuals.fracdiff fracdiff
snaive(AirPassengers)
#>          Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> Jan 1961            417 394.3746 439.6254 382.3974 451.6026
#> Feb 1961            391 368.3746 413.6254 356.3974 425.6026
#> Mar 1961            419 396.3746 441.6254 384.3974 453.6026
#> Apr 1961            461 438.3746 483.6254 426.3974 495.6026
#> May 1961            472 449.3746 494.6254 437.3974 506.6026
#> Jun 1961            535 512.3746 557.6254 500.3974 569.6026
#> Jul 1961            622 599.3746 644.6254 587.3974 656.6026
#> Aug 1961            606 583.3746 628.6254 571.3974 640.6026
#> Sep 1961            508 485.3746 530.6254 473.3974 542.6026
#> Oct 1961            461 438.3746 483.6254 426.3974 495.6026
#> Nov 1961            390 367.3746 412.6254 355.3974 424.6026
#> Dec 1961            432 409.3746 454.6254 397.3974 466.6026
#> Jan 1962            417 385.0028 448.9972 368.0646 465.9354
#> Feb 1962            391 359.0028 422.9972 342.0646 439.9354
#> Mar 1962            419 387.0028 450.9972 370.0646 467.9354
#> Apr 1962            461 429.0028 492.9972 412.0646 509.9354
#> May 1962            472 440.0028 503.9972 423.0646 520.9354
#> Jun 1962            535 503.0028 566.9972 486.0646 583.9354
#> Jul 1962            622 590.0028 653.9972 573.0646 670.9354
#> Aug 1962            606 574.0028 637.9972 557.0646 654.9354
#> Sep 1962            508 476.0028 539.9972 459.0646 556.9354
#> Oct 1962            461 429.0028 492.9972 412.0646 509.9354
#> Nov 1962            390 358.0028 421.9972 341.0646 438.9354
#> Dec 1962            432 400.0028 463.9972 383.0646 480.9354

Created on 2019-10-26 by the reprex package (v0.2.1)

Session info ``` r devtools::session_info() #> ─ Session info ────────────────────────────────────────────────────────── #> setting value #> version R version 3.6.1 (2019-07-05) #> os Ubuntu 18.04.3 LTS #> system x86_64, linux-gnu #> ui X11 #> language (EN) #> collate en_AU.UTF-8 #> ctype en_AU.UTF-8 #> tz Australia/Melbourne #> date 2019-10-26 #> #> ─ Packages ────────────────────────────────────────────────────────────── #> package * version date lib #> anytime 0.3.6 2019-08-29 [1] #> assertthat 0.2.1 2019-03-21 [1] #> backports 1.1.5 2019-10-02 [1] #> callr 3.3.2 2019-09-22 [1] #> cli 1.1.0 2019-03-19 [1] #> colorspace 1.4-1 2019-03-18 [1] #> crayon 1.3.4 2017-09-16 [1] #> curl 4.2 2019-09-24 [1] #> desc 1.2.0 2018-05-01 [1] #> devtools 2.0.2 2019-04-08 [1] #> digest 0.6.22 2019-10-21 [1] #> dplyr 0.8.3 2019-07-04 [1] #> evaluate 0.14 2019-05-28 [1] #> fabletools 0.1.1.9000 2019-10-22 [1] #> forecast * 8.9.0.9000 2019-10-11 [1] #> fracdiff 1.4-2 2012-12-02 [1] #> fs 1.3.1 2019-05-06 [1] #> generics 0.0.2 2018-11-29 [1] #> ggplot2 3.2.1 2019-08-10 [1] #> glue 1.3.1 2019-03-12 [1] #> gtable 0.3.0 2019-03-25 [1] #> highr 0.8 2019-03-20 [1] #> htmltools 0.4.0 2019-10-04 [1] #> knitr 1.25 2019-09-18 [1] #> lattice 0.20-38 2018-11-04 [3] #> lazyeval 0.2.2 2019-03-15 [1] #> lifecycle 0.1.0 2019-08-01 [1] #> lmtest 0.9-37 2019-04-30 [1] #> lubridate 1.7.4 2018-04-11 [1] #> magrittr 1.5 2014-11-22 [1] #> memoise 1.1.0 2017-04-21 [1] #> munsell 0.5.0 2018-06-12 [1] #> nlme 3.1-141 2019-08-01 [3] #> nnet 7.3-12 2016-02-02 [3] #> pillar 1.4.2 2019-06-29 [1] #> pkgbuild 1.0.6 2019-10-09 [1] #> pkgconfig 2.0.3 2019-09-22 [1] #> pkgload 1.0.2 2018-10-29 [1] #> prettyunits 1.0.2 2015-07-13 [1] #> processx 3.4.1 2019-07-18 [1] #> ps 1.3.0 2018-12-21 [1] #> purrr 0.3.3 2019-10-18 [1] #> quadprog 1.5-7 2019-05-06 [1] #> quantmod 0.4-15 2019-06-17 [1] #> R6 2.4.0 2019-02-14 [1] #> Rcpp 1.0.2 2019-07-25 [1] #> remotes 2.0.4 2019-04-10 [1] #> rlang 0.4.0 2019-06-25 [1] #> rmarkdown 1.16 2019-10-01 [1] #> rprojroot 1.3-2 2018-01-03 [1] #> scales 1.0.0 2018-08-09 [1] #> sessioninfo 1.1.1 2018-11-05 [1] #> stringi 1.4.3 2019-03-12 [1] #> stringr 1.4.0 2019-02-10 [1] #> testthat 2.2.1 2019-07-25 [1] #> tibble 2.1.3 2019-06-06 [1] #> tidyr 1.0.0 2019-09-11 [1] #> tidyselect 0.2.5 2018-10-11 [1] #> timeDate 3043.102 2018-02-21 [1] #> tseries 0.10-47 2019-06-05 [1] #> tsibble 0.8.4 2019-10-04 [1] #> TTR 0.23-5 2019-09-23 [1] #> urca 1.3-0 2016-09-06 [1] #> usethis 1.5.1 2019-07-04 [1] #> vctrs 0.2.0 2019-07-05 [1] #> withr 2.1.2 2018-03-15 [1] #> xfun 0.10 2019-10-01 [1] #> xts 0.11-2 2018-11-05 [1] #> yaml 2.2.0 2018-07-25 [1] #> zeallot 0.1.0 2018-01-28 [1] #> zoo 1.8-6 2019-05-28 [1] #> source #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> local #> local #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.5.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.5.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> Github (tidyverts/tsibble@3812a84) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> CRAN (R 3.6.0) #> CRAN (R 3.6.1) #> CRAN (R 3.6.1) #> #> [1] /home/mitchell/R/x86_64-pc-linux-gnu-library/3.6 #> [2] /usr/lib/R/site-library #> [3] /usr/lib/R/library ```
mitchelloharawild commented 4 years ago

Closing as MRE is not provided and I am unable to reproduce this issue.