Eval in R
R has an omnipotent function, the eval
function. In addition to evaluate any arbitrary R expression, it can also specify the environment in which the expression will be evaluated. The environment corresponds to the local scope, to a parent scope, of a caller function, or to a custom-built environment.
As eval
unleashes its power, how do people use eval
? Is it dangerous? Is it somehow analyzable? Can it be replaced automatically by more specialized functions?