Skip to main content
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Not able to run Holt-Winters

I downloaded the example app R_TimeSeriesAnalysis, however, I have not been able to run the script for the Holt-Winters method. I get the message: "Client Specified an Invalid Argument". I was able to run the example for moving averages but not this one. I also tried with a different dataset but it didn´t work.

The code, as included in the app is the following:

R.ScriptEval('library(TTR);library(forecast);forecast(HoltWinters(q$sumRain, beta=FALSE, gamma=FALSE), h=$(RainNumberOfYears))$fitted', Sum([rain]) as sumRain)

Has anyone experienced a similar issue?

What are the conditions that the data should meet?

Please help!

Labels (2)
5 Replies
Partner - Contributor II
Partner - Contributor II

Hello, Try to change the R code

'Rainfall London Forecast' sheet:

'library("TTR"); library("forecast"); forecast:::forecast.HoltWinters(HoltWinters(q$sumRain, beta=FALSE, gamma=FALSE),h=8)$fitted'

'Annual rainfall London 1813-1912' sheet:

'library(TTR);library(forecast);data.frame(forecast(HoltWinters(q$sumRain, beta=FALSE, gamma=FALSE), h=$(RainNumberOfYears)))[,1]'

Hope that helps

Not applicable

Unfortunately, this didn´t work for me!

I am a little bit frustrated after trying to make this work.

Thanks in any case!


2018-02-16 8:13 GMT-06:00 Maura Baltazar <>:

Contributor III
Contributor III

Hi Aineth,

Your R code looks the same as mine and mine is working ok.

Do the other visualisations in the qvf work ok?

Have you installed the requisite R packages (TTR, forecast)?

Partner - Contributor III
Partner - Contributor III


You forgot 2 semicolons after the function forecast() and at the end of the script.

R.ScriptEval('library(TTR);library(forecast);forecast(HoltWinters(q$sumRain, beta=FALSE, gamma=FALSE)

;  <--


;  <--

', Sum([rain]) as sumRain)

Contributor II
Contributor II

Hello, I also have that detail, but I found a possible solution, I do not know if it is the same result.

1.- update the version of R, the forecast library works from the version 3.5.1

2.- I guess this function has to predict, but as it is up to the same year known, I think it is not the original result

R.ScriptEval('library("TTR"); library("forecast"); HoltWinters(q$sumRain, beta=FALSE, gamma=FALSE)$fitted', Sum([rain]) as sumRain)                                                

3.- The link shows how to use the predict functions using the same library
Método Holt-Winters para Predicciones en R