Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_shetty78
Creator II
Creator II

Is it possible to return dataframe from R and show in a QS table?

Hi,

Is it possible to return a data frame from R and show the data in a Qliksense table?

Say I have some dimension list that I select and that gets passed into R and then R returns a dataframe that I show in a table.

Appreciate any help on this.

Thanks.

Labels (1)
7 Replies
JaMajka1
Partner Ambassador
Partner Ambassador

Could you post here an example?

Ralf_Heukäufer
Partner - Creator III
Partner - Creator III

Hello,

you can use this at first

Installing R with Qlik Sense.pdf

After the Installation you can use:

1. The Advanced Analytics Toolbox

Qlik Branch

GitHub - mhamano/advanced-analytics-toolbox: Qlik Sense extension which allows you to create charts ...

Under the Point Installation (in GitHub) you find the required R Packages you need to install for this Extension

2.  The Advanced Analytics Expression Builder

Qlik Branch

If you only want to use Expressions in the Qlik Sense Visualizations.

Anonymous
Not applicable

My solution is:

  • sent a vector or few vectors from Qlik
  • put them together in R script as a data frame
  • do the analytics
  • get a single column/vector from that dataframe in R as a output
  • show it in a calculation field as a single column
  • repeat it as many times as many columns from R (based on the input data) you need in Qlik - so every measure in Qlik is single column from output data frame from R
amit_shetty78
Creator II
Creator II
Author

Thanks hf-group‌.

akarolewski

Could you share an example of your solution please?

Thanks.

amit_shetty78
Creator II
Creator II
Author

Hi jamajka1‌, akarolewski‌, hf-group

Just to illustrate what I am trying to do in R I am running the following:

load("Data/Weighted_Values.RData");

ts <- data.frame(TS)

The output of 'ts' can be viewed in the following image:

Capture.PNG

I would like to show this result in a time series line chart in Qlik Sense.

I have the Date as dimension in my QS data model. I would like to map the date to the corresponding values returned.

Thanks.

Anonymous
Not applicable

In the Qlik Sense February 2018 release, support have been added for returning a whole table (dataframe) from the plugin to Qlik in a single request, when called from the Qlik Sense load script. This means that you can add a dataframe from R as a table in the Qlik data model during data reload.

So stay tuned for the Feb 2018 release where more information will come regarding this.

amit_shetty78
Creator II
Creator II
Author

Thanks tln‌. Look forward to the Feb 2018 release to make use of this feature.

I have been able to get the values from the dataframe to load into my chart at runtime using an expressions such as below:

R.ScriptEvalEx( 'S', 'load(paste("\\\\servename\\Data\\",q$DatasetName[1],".RData",sep="")); TS;'    , DatasetName As DatasetName)