ez.eval: wrapper of 'eval'

View source: R/os.R

ez.evalR Documentation

wrapper of eval

Description

wrapper of eval

Usage

ez.eval(cmd, env = parent.frame())

ez.evaluate(cmd, env = parent.frame())

Arguments

cmd

an R cmd in text, e.g., constructed with sprintf()

env

caller's envir, could be environment(), .GlobalEnv (same as globalenv()), default is parent.frame() if default parent.frame() does not work properly, try passing environment() tricky/hard to hard-code/default it in this wrapper function, R does not support call stack well.

Value

this function evaluates the cmd in the caller's envir, so the actual return depends on the caller/cmd

Examples

ez.eval('z=9',environment())

jerryzhujian9/ezmisc documentation built on March 9, 2024, 12:44 a.m.