1 Reply Latest reply: Sep 21, 2017 7:41 AM by Felix Kirchgeorg RSS

    Using Nested R Functions with Qlik Sense Extension, R, and Open CPU Integration Approach with Open CPU Defaults?

    Robert Klein

      Hello, as someone with a fair amount of R experience who is brand new to Qlik, I was very excited to find some of the work that has been done to create Qlik Sense Extensions that use R's capabilities via Open CPU:


      Unfortunately, I am struggling to figure out how to use some basic R commands in this setup because I will have to use the default Open CPU R packages and so cannot create custom R functions as in GitHub - aasensior/sense-r: Functional examples on integrating Qlik Sense and R.


      For example, how would one return the R console output for the summary (to see significance levels and more) of a linear regression object in this setup?  In R, using the packaged "cars" dataset, that might be done with "summary(lm(cars$speed~cars$dist))".  However, I am not sure how to nest the "lm" function within the "summary" function, especially when the "summary" function is found in https://public.opencpu.org/ocpu/library/base/R/ and "lm" in https://public.opencpu.org/ocpu/library/stats/R/.


      The function "lm" alone is used around line 69 in https://raw.githubusercontent.com/nodtvedt/qlik-sense-r-regression-extension/master/qlik-sense-r-regression-extension.js.


      How would that script need to be changed to return the summary of the linear regression object instead?


      These may be beginner questions, but any help would be greatly appreciated!