lazyeval v0.2.1


Monthly downloads



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

Vignettes of lazyeval

No Results!

Last month downloads


License GPL-3
LazyData true
VignetteBuilder knitr
RoxygenNote 6.0.1
NeedsCompilation yes
Packaged 2017-10-18 22:37:44 UTC; lionel
Repository CRAN
Date/Publication 2017-10-29 22:59:36 UTC

Include our badge in your README