tidyverse-patterns

Replace legacy R tidyverse idioms with modern dplyr, purrr, and stringr patterns.

1|1|Updated May 5, 2026
One-click install
npx skills add https://github.com/cynkra/cynkra.ai.day --skill tidyverse-patterns-cynkra
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tidyverse-patterns
Source: https://github.com/cynkra/cynkra.ai.day/tree/main/claude-code-r-skills/.claude/skills/tidyverse-patterns
Command: npx skills add https://github.com/cynkra/cynkra.ai.day --skill tidyverse-patterns-cynkra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you avoid outdated or error-prone R tidyverse idioms by providing modern, readable, and correctness-checked patterns for data transformation workflows.

Core Features & Use Cases

  • Modern pipelines and joins: Prefer the native pipe |> and join_by()-based joins for clearer intent and advanced join types (inequality, rolling, overlap).
  • Join correctness guardrails: Enforce assumptions with relationship, fail on unexpected results with unmatched = "error", and prevent silent NA-matching with na_matches = "never".
  • Reliable dplyr/purrr/stringr techniques: Use .by for per-operation grouping, pick()/{{}}/.data[[...]] for tidy evaluation, reframe() for multi-row summaries, map() |> list_rbind() instead of deprecated purrr patterns, and stringr functions for consistent string manipulation.

Quick Start

Use the tidyverse-patterns guidance to rewrite your current R pipeline to use |>, join_by(), and the strict join validation settings that match your expected cardinality.

Frequently Asked Questions about tidyverse-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to handle dplyr joins to prevent silent data loss?▼

To prevent silent data loss in dplyr joins, use `join_by()` with strict validation settings like `unmatched = "error"` and `na_matches = "never"`. This enforces cardinality assumptions and prevents unexpected NA matching.

How do I replace deprecated purrr mapping patterns in modern R code?▼

Replace deprecated purrr mapping patterns by using `map() |> list_rbind()` instead of older list-binding functions. This ensures reliable functional data transformation workflows in modern tidyverse ETL pipelines.

Does dplyr 1.1+ support per-operation grouping without group_by?▼

Yes, dplyr 1.1+ supports per-operation grouping without `group_by()` by using the `.by` argument. This allows scoped transformations directly within mutate or summarise, avoiding persistent grouping state side effects.

Why should I use the native pipe instead of the magrittr pipe in tidyverse workflows?▼

You should use the native R pipe `|>` instead of the magrittr pipe for clearer intent and modern R compatibility. It ensures correct, maintainable tidyverse data transformation workflows without relying on legacy dependencies.

How do I use tidy evaluation best practices with dynamic column names in dplyr?▼

Use tidy evaluation best practices with dynamic column names in dplyr by applying `pick()`, `{{}}` for defusion, and `.data[[...]]` for string-based column selection. This ensures robust and safe data transformation logic.

When do I need reframe instead of summarise for multi-row summaries?▼

You need `reframe()` instead of `summarise()` when calculating multi-row summaries that return more than one row per group. `reframe()` guarantees consistent output shapes without invalidating grouping structures.