I'm interested in making use of a special call within call
/eval
as in the code:
eval(call("mean", c(2,3)))
which will correctly produce result 2.5. Now, I would like to use the same syntax with a special call.
Example: +
Call:
eval(call("`+`", c(2,3)))
produces error:
Error in eval(expr, envir, enclos) : could not find function "
+
"Similarly with the call,
eval(call("+", c(2,3)))
does not produce desired results:
[1] 2 3
Desired result should simply return vector of length 1 with single value 5 as obtained via 2 + 3
call.