Learn R Programming

lazyeval

The lazyeval package provides tools that make it easier to correctly implement non-standard evaluation (NSE) in R. You use lazy evaluation by requiring the user to "quote" specially evaluated arguments with ~, and then using the lazyeval package to compute with those formulas. It is also possible to eliminate the use of the ~ by converting promises to formulas. This does make programming with such functions a little harder, but it can be worth it in certain situations. See vignette("lazyeval") for more details.

Installation

Install the released version from CRAN with:

install.packages("lazyeval")

Install the development version from github with:

# install.packages("devtools")
devtools::install_github("hadley/lazyeval", build_vignettes = TRUE)

Copy Link

Version

Install

install.packages('lazyeval')

Monthly Downloads

579,957

Version

0.2.2

License

GPL-3

Maintainer

Last Published

March 15th, 2019

Functions in lazyeval (0.2.2)

call_new

Create a call by "hand"
f_interp

Interpolate a formula
as.lazy

Convert an object to a lazy expression or lazy dots.
f_eval_rhs

Evaluate a formula
all_dots

Combine explicit and implicit dots.
function_new

Create a function by "hand"
make_call

Make a call with lazy_dots as arguments.
missing_arg

Generate a missing argument.
as_name

Coerce an object to a name or call.
ast_

Display a call (or expression) as a tree.
f_rhs

Get/set formula components.
expr_label

Find the expression associated with an argument
f_text

Turn RHS of formula into a string/label.
f_capture

Make a promise explicit by converting into a formula.
is_lang

Is an object a language object?
lazy_

Capture expression for later lazy evaluation.
interp

Interpolate values into an expression.
lazy_dots

Capture ... (dots) for later lazy evaluation.
is_formula

Is object a formula?
lazy_eval

Evaluate a lazy expression.
call_modify

Modify the arguments of a call.
auto_name

Automatically name all components of a lazy dots.
f_unwrap

Unwrap a formula
f_list

Build a named list from the LHS of formulas
f_new

Create a formula object by "hand".
common_env

Find common environment in list of lazy objects.