I'm curious to know if R can use its eval()
function to perform calculations provided by e.g. a string.
This is a common case:
eval("5+5")
However, instead of 10 I get:
[1] "5+5"
Any solution?
转载于:https://stackoverflow.com/questions/1743698/evaluate-expression-given-as-a-string