yes that worked for me.
but it is much easier with the new version of Qlik sense.
now i've got this
R.ScriptEval('lm(q$Invest ~ q$RegInnen)$fitted' , Avg(ADI_Skaliert) as Invest, RegInnen)
and it works perfectly. The only problem is that I am not able to extract the r squared of the regression for this regression