Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Looking for advise on how to call an RScript in an extension backend. I have configured R with Qlik Sense and the script gets called successfully from front end.
Extension Functionality - When user clicks on a button, the extension should dynamically create an QHypercube (internally call R Function) and display its output.
Below is my code
controller: ['$scope', function ( $scope ) {
var app = qlik.currApp();
$scope.checkIfButtonPressed = function($event){
app.createCube({
qDimensions:[],
qMeasures:[{
qDef:{
qDef:"R.ScriptAggr('count(q$survived);',survived)" //-- this doesnt give any output
//qDef: "count(survived)" --this works
}
}],
qInitialDataFetch:[{
qHeight:20,
qWidth:2
}]
},function(reply){
alert(reply.qHyperCube.qDataPages[0].qMatrix[0].qNum);
}
});
}
}
Thanks,
Hari Krishna
I figured it. Calling R from hypercube works, I was using count() function which has to be len() in R. I could see data being sent to RServe and the communication happening. Thanks