lazyeval v0.2.0


Monthly downloads



by Hadley Wickham

Lazy (Non-Standard) Evaluation

An alternative approach to non-standard evaluation using formulas. Provides a full implementation of LISP style 'quasiquotation', making it easier to generate code with other code.



Build Status Coverage Status

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.


Install the released version from CRAN with:


Install the development version from github with:

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

Functions in lazyeval

Name Description
as_name Coerce an object to a name or call.
f_capture Make a promise explicit by converting into a formula.
expr_label Find the expression associated with an argument
all_dots Combine explicit and implicit dots.
ast_ Display a call (or expression) as a tree.
call_new Create a call by "hand"
common_env Find common environment in list of lazy objects.
as.lazy Convert an object to a lazy expression or lazy dots.
auto_name Automatically name all components of a lazy dots.
call_modify Modify the arguments of a call.
f_list Build a named list from the LHS of formulas
is_formula Is object a formula?
f_text Turn RHS of formula into a string/label.
f_rhs Get/set formula components.
function_new Create a function by "hand"
f_new Create a formula object by "hand".
f_unwrap Unwrap a formula
interp Interpolate values into an expression.
f_eval_rhs Evaluate a formula
make_call Make a call with lazy_dots as arguments.
lazy_dots Capture ... (dots) for later lazy evaluation.
missing_arg Generate a missing argument.
lazy_ Capture expression for later lazy evaluation.
lazy_eval Evaluate a lazy expression.
is_lang Is an object a language object?
f_interp Interpolate a formula
No Results!

Last month downloads


License GPL-3
LazyData true
VignetteBuilder knitr
RoxygenNote 5.0.1
NeedsCompilation yes
Packaged 2016-06-10 21:38:52 UTC; hadley
Repository CRAN
Date/Publication 2016-06-12 19:03:08

Include our badge in your README