rlang 0.1.1
Tidy evaluation fixes
This release includes two important fixes for tidy evaluation:
-
Bare formulas are now evaluated in the correct environment in
tidyeval functions. -
enquo()now works properly within compiled functions. Before this
release, constants optimised by the bytecode compiler couldn't be
enquoted.
New functions:
-
The
new_environment()constructor creates a child of the empty
environment and takes an optional named list of data to populate it.
Compared toenv()andchild_env(), it is meant to create
environments as data structures rather than as part of a scope
hierarchy. -
The
new_language()constructor creates calls out of a callable
object (a function or an expression) and a pairlist of arguments. It
is useful to avoid costly internal coercions between lists and
pairlists of arguments.
UI improvements:
-
env_child()'s first argument is now.parentinstead ofparent. -
mut_setters likemut_attrs()and environment helpers like
env_bind()andenv_unbind()now return their (modified) input
invisibly. This follows the tidyverse convention that functions
called primarily for their side effects should return their input
invisibly. -
is_pairlist()now returnsTRUEforNULL. We addedis_node()
to test for actual pairlist nodes. In other words,is_pairlist()
tests for the data structure whileis_node()tests for the type.
Bugfixes:
-
env()andenv_child()can now get arguments whose names start
with.. Prior to this fix, these arguments were partial-matching
onenv_bind()'s.envargument. -
The internal
replace_na()symbol was renamed to avoid a collision
with an exported function in tidyverse. This solves an issue
occurring in old versions of R prior to 3.3.2 (#133).