Forecast Error (list) object cannot be coerced to type 'double'

698 views Asked by At

When I try to run the following code with R:

 d.arima=autoplot(vv, ts.colour = ('dodgerblue3'), ts.linetype =  'dashed',
 xlab='Date',ylab='Consommation des pdts pétroliers',
 main="Evolution de la consommation mensuelle des produits pétroliers")
 d.forecast <- forecast(d.arima, level = c(80,95), h = 50)
 autoplot(d.forecast)

I get this error :

  Error in is.constant(y) : 
  (list) object cannot be coerced to type 'double'

PS:

class(d.arima)
[1] "gg"     "ggplot"

Can anyone give me a hand on solving the problem ?

0

There are 0 answers