Is it possible to pass parameters to R data queries? For instance, my query is
let
Quelle = R.Execute("NormalNoise <- data.frame(x=rnorm(100, mean=0, sd=1)"),
EnvVars1 = Quelle{[Name="NormalNoise"]}[Value]
in
EnvVars1
Now, is it possible to pass parameters to the string in R.Execute? For instance, I want to define a parameter NoiseMean and NoiseSd in the Query Window and use their value.
EDIT: I tried to use the "&" operator as I know it from VBA:
let
Quelle = R.Execute("NormalNoise <- data.frame(x=rnorm(100, mean="&NoiseMean&", sd=1)"),
EnvVars1 = Quelle{[Name="NormalNoise"]}[Value]
in
EnvVars1
however, I get the error message that "&" can not applied to text and numbers