Skip to content

rlang is a collection of frameworks and APIs for programming with R.

Frameworks

Two comprehensive frameworks are implemented in rlang.

  • tidy eval, a programmable data-masking framework used in tidyverse packages like dplyr and ggplot2. As a user, you will encounter the embracing operator {{ and name injection with the glue operators "{" and "{{".

  • rlang errors, a set of tools to signal and display errors. This includes backtrace capture with global_entrace() and backtrace display with last_error() and last_warnings(). Use abort() to create errors with bullet lists, structured metadata, and error chaining support.

    The display of error messages is optimised for bullet lists and chained errors and optionally integrates with the cli package (see local_use_cli()).

Argument intake

A set of tools help you check, validate, and preprocess arguments.

Programming interfaces

rlang provides various interfaces for working with R and R objects.

Installation

Install the released version of rlang from CRAN:

Or install the development version from GitHub with:

# install.packages("pak")
pak::pkg_install("r-lib/rlang")

Code of Conduct

Please note that the rlang project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.