dplyr (version 0.1)

var_eval: Evaluate variable names in the context of a tbl.

Description

Evaluate variable names in the context of a tbl.

Usage

var_eval(exprs, tbl, parent = parent.frame())

select_eval(exprs, select, parent = parent.frame())

var_index(exprs, tbl, parent = parent.frame())

Arguments

exprs
a list of unevaluated expressions
tbl,select
a tbl or a select language list
parent
the parent frame in which to evaluate variables/functions not found in tbl

Examples

Run this code
var_eval(list(quote(mpg:wt)), mtcars)

select <- lapply(names(mtcars), as.name)
select_eval(list(quote(mpg:wt)), select)

mutate <- c(select, cyl2 = quote(cyl * 2))
select_eval(list(quote(gear:cyl2)), mutate)

Run the code above in your browser using DataLab