[R] Error plotting the results form a Holt Winters model with no seasonality

Jeff Reichman re|chm@nj @end|ng |rom @bcg|ob@|@net
Fri Jun 19 19:00:42 CEST 2020


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]]



More information about the R-help mailing list