Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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