lazyeval v0.2.2

0

Monthly downloads

0th

Percentile

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.

Readme

lazyeval

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.

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)

Functions in lazyeval

Name Description
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.
No Results!

Vignettes of lazyeval

Name
lazyeval-old.Rmd
lazyeval.Rmd
No Results!

Last month downloads

Details

License GPL-3
LazyData true
VignetteBuilder knitr
RoxygenNote 6.1.1
NeedsCompilation yes
Packaged 2019-03-15 14:18:01 UTC; lionel
Repository CRAN
Date/Publication 2019-03-15 17:50:07 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/lazyeval)](http://www.rdocumentation.org/packages/lazyeval)