nealrichardson / rlang

Low-level API for programming with R

Home Page:https://rlang.r-lib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rlang

R-CMD-check Codecov test coverage Lifecycle Status

Important: The rlang API is still maturing. Please see ?rlang::lifecycle for the list of functions that are considered stable.

Overview

The rlang package provides tools to work with core language features of R and the tidyverse:

  • The tidy eval framework, which is a well-founded system for non-standard evaluation built on quasiquotation (!!) and quoted arguments (enquo()). See https://tidyeval.tidyverse.org.

  • User-friendly error reporting with backtraces and chained errors (abort(), trace_back(), with_abort()).

  • A consistent API for working with base types. Note that overall this is a work in progress that is still in flux:

    • Environments, e.g. env(), env_has(), env_get(), env_bind(), env_unbind(), env_print().

    • Calls and symbols, e.g. call2(), is_call(), sym(), syms().

    • Functions, e.g. new_function(), as_function(). The latter supports the purrr-style formula notation for lambda functions.

    • Vectors, including construction (lgl(), int(), ...) and predicates (is_logical(), is_character()).

    • Attributes, e.g. set_names().

Installation

You can install the released version of rlang from CRAN with:

install.packages("rlang")

Or install the development version from github with:

# install.packages("remotes")
remotes::install_github("r-lib/rlang")

Cheatsheet

tidy eval cheatsheet

About

Low-level API for programming with R

https://rlang.r-lib.org

License:Other


Languages

Language:R 64.7%Language:C 35.2%Language:C++ 0.0%Language:Makefile 0.0%