Documents for QlikView related information.
Thanks to @etk (Integrating QV with R example kit.zip ) for showing us the integration of QV with R.
As well to Brian Bauer for helping out with the integration problems of integration with various version of R.
I have recently been using this integration, and have found out an easy way of using the macro, without writing same lines of R code in the macro with 'R.EvaluateNoReturn' and the inverted commas.
Please go through the images attached below.
I guess some might be knowing this already.
But I hope it might help someone so felt it worth sharing
Hi Swapneel,I am new to QlikView.the code i have written in my .r file works in R but the macro doesnot qwork.I didnot get the note - 2.You will need to write the exporting from QV path before this procedure in the Macro.Please explain
Firstly Yes, you will need to write the exporting from QV path before calling the R function as a part of the Macro.
And then call the R function (.R) file.
Please see the below attached image.
Hope it helps, feel free to contact
Thanks & Regards,
Hi swapneel,thanks for the Image.I am now able to run the code in QlikViewIt was very helpful...:)
I am happy to hear that it worked & it made your work easy indeed.
And you are most welcome
Heyy...Do u know how to get multidimensional array data back to QlikViewI tried using getsymbol().It doesnot work.
I was able to make the connection happen for the demo, and now I am trying to write a macro in QlikView with some of our data. I am having trouble though for some reason exporting the data from QlikView to run the analysis on. Below is my current macro... any ideas? Would really appreciate the help (my internship is coming to a quick close!)
Set v = ActiveDocument.GetVariable("vAppPath")
CurrentPath = Replace(v.GetContent.String,"\","/")
Set R = CreateObject("StatConnectorSrv.StatConnector")
I guess there's an error at the line
you are trying to call CurrentPath variable in R, which actually exists in QV.
So I guess thats the point of error.
Change or remove that line for a while & try testing it.
Do let me know how this goes.
I tried removing the line but it still seems to not be working. I don't think the data actually gets exported to R, otherwise I would see my CPU increase for R studio. Does the object have to be a particular type to export? Like a straight table?
I'm sorry that above comment is incorrect. The table is being created, because it shows up in my files. I think the issue is that R is not able to read the table. Do you know why this is happening? If I try to read the data into R, I get the following error:
When run this code and try to view the table: testData<-read.csv("O:/QlikView Training/Alice/ExportFile.csv", encoding='UTF-8')
Error I get in the table viewer:
/content?title=testData&file=a2fbce58927548b6a7173da062f36c84.htm not found
I read somewhere else that all objects sent from Qlikview are encoded "UTF-8" (Maybe the persons statement was incorrect). Could this be the issue?
Plz tell me if you are running the same macro, where is the data being exported ?
The path of csv where its exported, needs to be set in the set path & then the call to the R script needs to be initiated.
About the formatting, I dont think it should make any difference as it has been the same always or try making changes to the Document Properties and set the encoding to ANSI