Description Usage Arguments Details Value See Also Examples
Apply a function over a data frame of quoted expressions.
Parallel execution is available using the .split and .tasks arguments.
1 | eply(.fun, .expr, .with = parent.frame())
|
.fun |
function to evaluate. |
.expr |
data frame of quoted expressions. Column names must
contain the argument names of |
.with |
list, data frame, or environment with the
data accessible to |
.fun is a function, and .expr is a data frame.
In .expr, each row stands for a single call to .fun, and each
column stands for an argument. Each element is a quoted expression that
uses the data in .with during evaluation.
When eply is called on each row, the expressions
are evaluated on .with,
and the results are given to .fun as function arguments.
The column names of .expr must
contain the argument names of .fun.
With .tasks and .split, Mac and Linux users can
distribute the work over multiple parallel tasks. See the vignette for an
example (vignette("eply")).
a list or vector of return values of .fun.
1 2 3 4 5 6 7 | # Get an example data frame of commands that evaluate to function arguments.
.expr <- example.expr()
.fun <- example.fun # Get an example collection of functions.
# Get an example list of supporting data. Could be an environment.
.with <- example.with()
# Row-by-row, evaluate the code in .expr and feed the results to the function.
eply(.fun = .fun, .expr = .expr, .with = .with)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.