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