3 Replies Latest reply on Nov 16, 2018 7:52 AM by Santiago Sanchez

    Error in forecast()

    Ina Alban

      Hello,

      I keep on getting this error whenever I run my forecast function

       

      Error in base::parse(text = .cmd) : <text>:6:0: unexpected end of input 4: n <- length(.arg1[1]); 5: append(.arg1[(.arg2[1]+1):n],fcast$mean, after = n-.arg2[1] ^

       

       

      Here is my code that generates this error:

      SCRIPT_REAL("library(forecast);

      time <- ts(.arg1, start = c(2010,1), frequency=12);

      fcast <- forecast(time, h= .arg2[1]);

      n <- length(.arg1[1]);

      append(.arg1[(.arg2[1]+1):n],fcast$mean, after = n-.arg2[1]",

      SUM([Sales]), [Periods to Forecast])

       

      Hope someone can help me fix this error. Thanks!