2 Replies Latest reply: Nov 6, 2017 1:44 PM by Sagar Ganapaneni RSS

    How do you call custom R-scripts using R-integration?

    Jokke Ruokolainen

      Hello,

      I've got a question about the new R.ScriptEval, how does one call custom R-scripts using this new syntax?

      Let's say that I have a neuralnetworkmodel trained for timeseries prediction called NN.r and I want to call it from Sense as a measure column or a graph etc.

      Do I need to use include in laod to bring r-script to sense or do I need to make it into a package and add it to my current R-library and call it with lib.

      How does this work? I'm a bit lost with no documentation on these new R-functions.

       

      thx

        • Re: How do you call custom R-scripts using R-integration?
          Bas van Reeuwijk

          Hi Jokke,

           

          Each call from Qlik Sense to R is a separate session, so in the script that you pass on as an argument to R, you will need to load the library and all other relevant items needed for your calculation. All processing is done in R. You specify the R script to run and the one or more vectors this script needs as source data to do the processing. Qlik Sense then expects a vector of data points as a result of this evaluation with the same number of rows and in the same order.

           

          Hope this helps.

           

          Regards,

          Bas