Description Usage Arguments Details Value Author(s) See Also Examples
Do lazy evaluation on a named list of quoted R expressions in an environment constructed from data, modifying the original data.
1 |
data |
A data.frame or list. |
exprlist |
A named list of quoted expressions. |
... |
Ignored. |
This is a dialect of the base function within
. Like the base
function, inside
evaluates the expression(s) passed to it in a
special environment constructed from data
and returns the data,
modified with the evaluated expressions.
But whereas the base function is passed an expression, exprlist
is a named list of quoted expressions. Each expression in the
list is evaluated, assigned to its corresponding name, and included in
the return.
Evaluation starts with the first member of exprlist
, then the
second, and so on. If an expression A is evaluated and A contains the
name of another expression B, B is evaluated before A. Therefore, the
members of exprlist
may contain references to each other and
exprlist
may be ordered in any way. This is accomplished by
evaluating the expressions via promises, and this evaluation framework
is the main advantage of using inside
over the base function
within
.
The parent environment is that of the caller.
A list or a data.frame containing data
and the evaluated
members of exprlist
.
Robert Sams robert@sanctumfi.com
Class "expr.frame" and within
(base package).
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.