Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik experts,
I'm trying to use R.Scriptaggrstr function to get a concatenations of strings based on numbers which are returns of some R expression.
Each result is fine when it is brought by R.scriptaggr, but when I use R.Scriptaggrstr('paste(exp1,exp2....)') the results of the expressions are wrong. Any idieas of this issue?
thanks in advance
Rodolfo Souza
Maybe try R.ScriptAggrExStr and as you pass numbers specify R.ScriptAggrExStr('NN', 'paste(q$exp1,q$exp2....)' ,exp1 as exp1, exp2 as exp2). You indiciate that you take numbers but you want text output.
Also please be more specific - what do you mean "wrong numbers"? What is returned - error or wrong numbers? Qlik can pass data in different order than you assume - it passes in "table" order.
Maybe try R.ScriptAggrExStr and as you pass numbers specify R.ScriptAggrExStr('NN', 'paste(q$exp1,q$exp2....)' ,exp1 as exp1, exp2 as exp2). You indiciate that you take numbers but you want text output.
Also please be more specific - what do you mean "wrong numbers"? What is returned - error or wrong numbers? Qlik can pass data in different order than you assume - it passes in "table" order.
Hi Adam, thanks for your answer, I was attempting to make a text based on two number, for example:
num1 is the result of R.scriptaggr, this step works fine
num2 is the result of R.scriptaggr, this step works fine and works fine too.
When I try R.scriptaggr('paste("some text ",num1Rexpression," some text ",num2Rexpression," some text")', parameters).
the result of this is: some text num3 some text num4 some text
the characters are OK, but num3 was not the expected num1, either for num2.
On summary: the result of the numeric portion of the result string are not the same as the isolate R.scriptaggr functions
Rodolfo Souza
Adam, the changes you suggested worked fine.
thanks a lot
Rodolfo Souza