[ top | up ]

Evaluate an (Unevaluated) Expression

Syntax

eval(expr, envir=sys.frame(sys.parent()))

Value

This function evaluates the expression expr argument in the environment specified by envir and returns the compted value. If envir is not specified, then the environment where the call to eval is made is used.

See Also

expression, environment.

Examples

eval(2 ^ 2 ^ 3) mEx <- expression(2^2^3); mEx; 1 + eval(mEx) eval({ xx <- pi; xx^2}) ; xx