GithubHelp home page GithubHelp logo

r-wasm / rlang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r-lib/rlang

0.0 0.0 0.0 10.19 MB

Low-level API for programming with R

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

License: Other

C++ 0.05% C 35.12% R 64.81% Makefile 0.01%

rlang's Introduction

rlang

Codecov test coverage Lifecycle Status R-CMD-check

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.

  • Checking function arguments, e.g. arg_match(), check_required(), and check_exclusive().

  • Checking dots, e.g. check_dots_used() and check_dots_empty().

  • Collecting dynamic dots, e.g. list2(). These dots support splicing with !!! and name injection with the glue operators "{" and "{{".

Programming interfaces

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

  • The R session, e.g. check_installed(), on_load(), and on_package_load().

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

  • Evaluation, e.g. inject() and eval_bare().

  • Calls and symbols, e.g. call2(), is_call(), is_call_simple(), data_sym(), and data_syms().

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

Installation

Install the released version of rlang from CRAN:

install.packages("rlang")

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.

rlang's People

Contributors

001ben avatar batpigandme avatar bisaloo avatar davisvaughan avatar egnha avatar gaborcsardi avatar hadley avatar jennybc avatar jimhester avatar kevinykuo avatar krlmlr avatar lionel- avatar maelle avatar matthieugomez avatar maurolepore avatar mgirlich avatar michaelchirico avatar mikmart avatar nathaneastwood avatar nealrichardson avatar osorensen avatar pkq avatar rcannood avatar richierocks avatar romainfrancois avatar salim-b avatar schloerke avatar timtaylor avatar topepo avatar yutannihilation avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.