Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Integration of R in QV R

Hi all,

I am currently facing some challenges while creating a connection between QV and R.

Some background info, I'm rather new in QlikView and I have only basic knowledge in R.

I found some examples here on how to create the connection between both tools, and which is also working.

However when I create a new application, just a simple one, it doesn't work like it supposed to. I believe the command 'R.EvaluateNoReturn' doesn't react.. Below you can find my code in a function that is triggered after clicking on a button.

As expected, the screen of statConn is shown after triggering the macro script.

Set v = ActiveDocument.GetVariable("vAppPath")
CurrentPath = Replace(v.GetContent.String,"\","/")
'Export the selected data to R
Set MyData = ActiveDocument.GetSheetObject("DataToR")
MyData.Export CurrentPath&"/Test/ExportDataToR.csv",",",0
'Create a COM object representing R
Set R = createobject("StatConnectorSrv.StatConnector")
R.Init "R"
R.EvaluateNoReturn "QVData <- c(1,2,3,4)"
R.EvaluateNoReturn "write.table(QVData,'text.txt',col.names = NA)"
'End connection with R
R.close

It should generate a new txt-file with just 1,2,3,4 in it, but it doesn't work.

Has anyone suggestions? Are there alternatives of using 'EvaluateNoReturn'?

Thank you in advance!

Regards

0 Replies