Learn R Programming

eply (version 0.1.2)

evals: Function evals

Description

Evaluate a character vector as a bunch of expressions.

Usage

evals(x = NULL, .with = parent.frame(), .simplify = TRUE)

Arguments

x

character vector of expressions to evaluate

.with

list, data frame, or environment with the data accessible to the expressions in x

.simplify

TRUE to simplify the result and FALSE otherwise

Value

a list or vector of return values of .fun.

See Also

eply, help_eply

Examples

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

Run the code above in your browser using DataLab