Suppose I have a function in R called foo. foo = function(x) { print(x); } When I create the Rengine re and do re.eval("foo(1)") I get the output 1. However, if I create a string variable in java String num = 1 and do re.eval("foo(num)"), I get an error saying that num cannot be found. How can I fix this problem. -- View this message in context: http://r.789695.n4.nabble.com/R-functions-in-Java-tp2995428p2995428.html Sent from the R help mailing list archive at Nabble.com.
Any advice? -- View this message in context: http://r.789695.n4.nabble.com/R-functions-in-Java-tp2995428p2995490.html Sent from the R help mailing list archive at Nabble.com.
For example, if I have the function in R: sum = function(a,b) { sum = a+b return sum } In Java: re.eval(sum(a,b)) gives me an error. -- View this message in context: http://r.789695.n4.nabble.com/R-functions-in-Java-tp2995428p2995620.html Sent from the R help mailing list archive at Nabble.com.