4 Replies Latest reply: Jan 2, 2018 5:44 PM by Oguchi Nkwocha RSS

    KPI measure off R.ScriptEval() as Expression

    Oguchi Nkwocha

      I need to grab a value from R using R.ScriptEval() for KPI measure. The R code works and produces a discrete value. The Expression is "OK" ; but the KPI produces null (nothing, just a dash). Yes, Rserve and SSEtoRServe are both on.

      Any help is appreciated.


      Here's the Expression I am using:


      R.ScriptEval('library(TTR);library(forecast);newdata <-read.csv("sldsmp.csv");frcst <-forecast(ts(q$newdata$a1ccnt));frcst1 <-as.data.frame(q$frcst[2]);frcst2 <-round(q$frcst1[1,],0);q$frcst2')



      Here's the R code:




      newdata <-read.csv("C:/<...>/Documents/Qlik/sldsmp.csv")

      frcst <-forecast(ts(newdata$a1ccnt))

      frcst1 <-as.data.frame(frcst[2])

      frcst2 <-round(frcst1[1,],0)



      • removing "q$" in all but first instance does not make a difference.


      Here's the .csv file I am referencing:

      See attachment.


      Thank you!