Skip to content

rlang 0.1.1

Choose a tag to compare

@lionel- lionel- released this 08 May 08:51

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 to env() and child_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 .parent instead of parent.

  • mut_ setters like mut_attrs() and environment helpers like
    env_bind() and env_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 returns TRUE for NULL. We added is_node()
    to test for actual pairlist nodes. In other words, is_pairlist()
    tests for the data structure while is_node() tests for the type.

Bugfixes:

  • env() and env_child() can now get arguments whose names start
    with .. Prior to this fix, these arguments were partial-matching
    on env_bind()'s .env argument.

  • 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).