What problem does it solve?
rlang-patterns helps you write tidy-evaluation code that correctly handles data-masking, dynamic dots, and injection without ambiguity between data columns and environment variables.
Core Features & Use Cases
- Data-masking argument forwarding with
{{}} so function arguments behave like tidyverse expressions.
- Expression and value injection using
!! for single items and !!! for splicing multiple arguments (e.g., programmatic group_by, summarise inputs).
- Dynamic dots and explicit disambiguation via
list2(...) for flexible ... handling plus .data and .env to avoid name collisions in loops and reusable APIs.
- Use case: Build an R helper that summarizes arbitrary columns selected at runtime, supports both column names and expressions, and generates predictable output column names.
Quick Start
Ask the AI to show how to implement an R function that takes a data frame and a user-provided column expression, then uses {{ }} and .data to compute a summary without name collisions.