Jeff Reichman
2020-Jun-19 17:00 UTC
[R] Error plotting the results form a Holt Winters model with no seasonality
r-help I'm trying to use the TSstudio library to plot a forecast created from a Holt Winters model and I get the following error: Error in `[<-`(`*tmp*`, n + 1, , value = data.frame(x = tmp[["x"]][n], : subscript out of bounds So looking through the package documentation I tried the package's example data(USgas) library(forecast) fit <- ets(USgas) fc<- forecast(fit, h = 60) plot_forecast(fc) and get the same error Error in `[<-`(`*tmp*`, n + 1, , value = data.frame(x = tmp[["x"]][n], : subscript out of bounds So I am at a loss to figure out my error when the example gives me the same error. Sincerely Jeff Reichman [[alternative HTML version deleted]]
Bert Gunter
2020-Jun-19 17:32 UTC
[R] Error plotting the results form a Holt Winters model with no seasonality
OS? R version? package versions? Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jun 19, 2020 at 10:02 AM Jeff Reichman <reichmanj at sbcglobal.net> wrote:> r-help > > > > I'm trying to use the TSstudio library to plot a forecast created from a > Holt Winters model and I get the following error: > > > > Error in `[<-`(`*tmp*`, n + 1, , value = data.frame(x = tmp[["x"]][n], : > > subscript out of bounds > > > > So looking through the package documentation I tried the package's example > > > > data(USgas) > library(forecast) > fit <- ets(USgas) > fc<- forecast(fit, h = 60) > plot_forecast(fc) > > > > and get the same error > > > > Error in `[<-`(`*tmp*`, n + 1, , value = data.frame(x = tmp[["x"]][n], : > > subscript out of bounds > > > > So I am at a loss to figure out my error when the example gives me the same > error. > > > > Sincerely > > > > Jeff Reichman > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Eric Berger
2020-Jun-19 17:34 UTC
[R] Error plotting the results form a Holt Winters model with no seasonality
Hi Jeff, I tried to reproduce your problem with the package's example and I did not get an error. Here's the output from my sessionInfo(). R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.3 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] TSstudio_0.1.6 forecast_8.12 loaded via a namespace (and not attached): [1] Rcpp_1.0.4.6 urca_1.3-0 pillar_1.4.4 compiler_3.6.3 [5] xts_0.12-0 tseries_0.10-47 tools_3.6.3 digest_0.6.25 [9] packrat_0.5.0 viridisLite_0.3.0 jsonlite_1.6.1 nlme_3.1-148 [13] evaluate_0.14 lifecycle_0.2.0 tibble_3.0.1 gtable_0.3.0 [17] lattice_0.20-41 pkgconfig_2.0.3 rlang_0.4.6 rstudioapi_0.11 [21] crosstalk_1.1.0.1 curl_4.2 yaml_2.2.1 parallel_3.6.3 [25] xfun_0.14 httr_1.4.1 dplyr_1.0.0 knitr_1.28 [29] htmlwidgets_1.5.1 generics_0.0.2 vctrs_0.3.1 lmtest_0.9-37 [33] grid_3.6.3 nnet_7.3-14 tidyselect_1.1.0 data.table_1.12.8 [37] glue_1.4.1 R6_2.4.1 plotly_4.9.2.1 rmarkdown_2.2 [41] bookdown_0.19 tidyr_1.1.0 TTR_0.23-6 ggplot2_3.3.1 [45] purrr_0.3.4 magrittr_1.5 scales_1.1.1 ellipsis_0.3.1 [49] htmltools_0.5.0 quantmod_0.4.17 rsconnect_0.8.16 timeDate_3043.102 [53] colorspace_1.4-1 fracdiff_1.5-1 quadprog_1.5-8 lazyeval_0.2.2 [57] munsell_0.5.0 crayon_1.3.4 zoo_1.8-8 On Fri, Jun 19, 2020 at 8:03 PM Jeff Reichman <reichmanj at sbcglobal.net> wrote:> > r-help > > > > I'm trying to use the TSstudio library to plot a forecast created from a > Holt Winters model and I get the following error: > > > > Error in `[<-`(`*tmp*`, n + 1, , value = data.frame(x = tmp[["x"]][n], : > > subscript out of bounds > > > > So looking through the package documentation I tried the package's example > > > > data(USgas) > library(forecast) > fit <- ets(USgas) > fc<- forecast(fit, h = 60) > plot_forecast(fc) > > > > and get the same error > > > > Error in `[<-`(`*tmp*`, n + 1, , value = data.frame(x = tmp[["x"]][n], : > > subscript out of bounds > > > > So I am at a loss to figure out my error when the example gives me the same > error. > > > > Sincerely > > > > Jeff Reichman > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.