Qlik Community

Qlik Server Side Extensions Discussions

Discussion Board for collaboration on Server-Side Extensions and Advanced Analytics Integration.

Not applicable

Run Basic .R Script in Qlik Sense

I am trying to run a basic R script that does text mining for the I Have A Dream speech (see attached). I am trying to have Qlik both run the R script and have Qlik pick up the output for visualization (high frequency words). The SSE plugin is installed and although I have successfully test the R.ScriptEval and R.ScriptAggr functions, I am having difficulty testing this more intermediate level use case. Any guidance will be helpful. Thank you.

3 Replies
bvk
Contributor II

Re: Run Basic .R Script in Qlik Sense

Hi, Kwon,

Have you have a look at Brian Bauers post: Qlik AAI Load Script Example - R (Qlik Sense and QlikView)

This may be what you're looking for.

Regards,

Bas.

Not applicable

Re: Run Basic .R Script in Qlik Sense

Hi Bas,

I have studied Brian Bauer's post and have successfully run the Comorbidity app (very helpful). I tried to mimic the script logic using the following script below but encounter an argument error:

SET QvWorkPath='C:\QlikWarehouse\POC Development\Comorbidity\Qlik AAI Load Script Example - R';

SET RSource='$(QvWorkPath)\R\MLKJR.R';

R:

LOAD

*,

R.ScriptEval('starttime <- proc.time(); source(q$RSource); elapsed <- proc.time()-starttime; toString(unname(elapsed["elapsed"]));', RSource) as [Elapsed Time];

LOAD

'$(RSource)' as RSource

Autogenerate 1;

Employee
Employee

Re: Run Basic .R Script in Qlik Sense

if you want to do this is real time as a chart expression (with changes based upon selection), then to get a different granularity of input data to output data then the best way is to use an AGGR function.

But as per the previous answer, if you just need it as a one time thing against the whole data set, then running in the script is a better option.

Community Browser