I am a new user to Qlikview and I was trying to do product association integrating both R and Qlik. While doing this I am facing some statconnector problem ( ActiveX component can't create object: 'StatConnectorSrv.StatConnector' ) and I would like to know how to get the R results in Qlikview in form of a text document. Please help me in resolving this issue
Here is my macro -
' Create a COM object representing R
Set R = CreateObject("StatConnectorSrv.StatConnector")
R.EvaluateNoReturn "library(arules) "
R.EvaluateNoReturn "product.transaction.set <- read.csv('"&CurrentPath&"/finaldf2.csv', na.strings=c('.', 'NA', '', '?'), strip.white=TRUE, encoding='UTF-8')"
R.EvaluateNoReturn "rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = 'rules'))"
R.EvaluateNoReturn "rules.sub.services <- subset(rules, subset = lhs %pin% 'AO1')"
' Close R connection
Set v = ActiveDocument.GetVariable("vRuntime")
'v.SetContent Runtime(), True
' Load the scores into the QlikView application
ActiveDocument.DoReload 2, false,false 'Fail on error, Partial Reload
'WriteLog("Retrieved Scores from R at "&Runtime&".")