Qlik Community

QlikView Documents

Documents for QlikView related information.

Integrating QV with R example kit.zip


Integrating QV with R example kit.zip

This paper is designed to provide information explaining how QlikView can be integrated with R. R is an open source programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for statistical software development and data analysis (http://www.r-project.org/).

There are a couple of ways to integrate R with other software such as QlikView. This paper focuses on using COM interface and explains the details on the integration. Please note that the integration requires some code development in Visual Basic and a basic understanding of R language. This solution is tested with small data sets and could be suitable for the cases where the business users make selections on the QlikView application and uses the selected data sets for advanced statistics by using R. The goal of this document is to provide some guideline to technical resources on how QlikView R integration can be achieved.

Tags (1)
Labels (1)
Not applicable

Its a nice idea..bt can u plz suggest how r u getting data back to Qlikview using Getsymbol Function..is there another tool required for this.?

Not applicable

Hi there.

Thanks is a very interesting integration and very usefull for analytics.

However, after trying several of times to use the example, there's allways some erros in the code that i can't go further.

For instance:

R.EvaluateNoReturn "write.table(QVData,'text.txt',col.names = NA)

The macro test to the above line doesn't pass.


Don't pass as well.

Due to that, i'm not able to run any test in this integration.

Do you have any idea why is this happening?


Not applicable


Are you running the same Qvw ?? if yes then use

R.EvaluateNoReturn "write.table(QVData,'text.txt',col.names = NA)"

apart from this the macro

RResult=R.GetSymbol("DisplayResult")  will not pass the value bcz R.GetSymbol is applicable for single dimensional array only  and in our case DisplayResult is giving multidimensional result.

because of that you will face type mismatch error.

Not applicable



Do you know a way to get the a multimensional array from R?

Is theres a way to partial reload this data?


Not applicable

I get an error in the macro regarding :

1 - R.EvaluateNoReturn "setwd('C:\\R\\')"

2 - R.EvaluateNoReturn "write.table(QVData,'text.txt',col.names = NA)"

Im running the file exactly as the tutorial.

I'm running R 2.14.1 and the directory setup in R is C://. If i use that i can pass through step 1 but i stop in step 2.

Any suggestions?

Not applicable


Yes you can partially reload your result

By using ActiveDocument.Partial Reload and Write Replace before Load Statement in Load script .

.after storing your result at your local machine directory.

1.First Find out Your Directory using getwd()

Copy that directory in Code.

2. I guess You are missing Some R packeges..thts y u r getting an error.

Not applicable


I can ensure you that i have all the packages installed.

Is the table that copytoclipboard called clipboard?

We use read.table('clipboard') is that correct?

Just to let you know i use stanconn to connect R and Eviews and it works just fine.

I can't understand why in this tutorial the macro stops.


Not applicable

Dear all,

I am new to Qlikview, and I just downloaded this statistics package and installed.  However, when I run by clicking the "Cluster Analysis" button, the "Edit Module" pops up.  May I know what is wrong?



Not applicable

Dear Ranjeet,

         I met the same question, when use "GetSymbol", I found it can only read single dimension data, so I change the data to single dimension data, and read the data successfully, the "UBound" is correct. But I can't find how to use the data RResult(0)~RResult(149), it said "Type Mismatch".

         Can you help me to solve this problem? Thank you very much.

R.EvaluateNoReturn "my_points <- read.table('clipboard', head=T)"

R.EvaluateNoReturn "my_xy<-data.frame(x=my_points$x, y=my_points$y)"

R.EvaluateNoReturn "fit<-kmeans(my_xy, 3)"

R.EvaluateNoReturn "outdata<-fit$cluster"


MsgBox(UBound(RResult)) ' the box will show the correct answer "149"

MsgBox(RResult(0)) ' "Type Mismatch"


Not applicable


Yes. same table get written in Qlikview memory using CopytoClipboard..after that we are Passing the same table to R for analysis.. and R.EvaluateNoReturn "QVData <- read.table('clipboard')" is the correct Statement. I guess in ths tutorial Macro stops at RResult = r.GetSymbol("ClusterResult") bcz Getsymbol is not able to read your result which is multidimensional array..

Version history
Revision #:
1 of 1
Last update:
‎04-25-2012 11:13 PM
Updated by: