Learn R Programming

eply (version 0.1.2)

eply-package: The eply package provides ways to call eval(parse(text = ...)) in bulk. The evals() function is a vectorized version of eval(parse(text = ...)). eply() is like apply(MARGIN = 1) except that the elements of each row are eval(parse(text = ...))'ed before being supplied to the function.

Description

The eply package provides ways to call eval(parse(text = ...)) in bulk. The evals() function is a vectorized version of eval(parse(text = ...)). eply() is like apply(MARGIN = 1) except that the elements of each row are eval(parse(text = ...))'ed before being supplied to the function.

Arguments

References

<https://github.com/wlandau/eply>

Examples

Run this code
# NOT RUN {
# 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)
evals(x = c("a + 1", "b + 2"), .with = .with)
# }

Run the code above in your browser using DataLab