The lazy package provides the tools necessary to do non-stadard evaluation "right" in R. There are three principles:
-
Instead of using
substitute()
, uselazy()
to capture both expression and environment. -
Every function that uses NSE should have a standard evaluation partner that does all the work. This function should end with
_
. -
The SE-partner has a flexible input specification to make it easy for people to program with.
See the vignette for more details.
To install:
devtools::install_github("hadley/lazy")