Agent skill · research science · aiskillstore
r-development
Modern R development practices emphasizing tidyverse patterns (dplyr 1.1 and later, native pipe, join_by, .by grouping), rlang metaprogramming, performance optimization, and package development. Use when Claude needs to write R code, create R packages, optimize R performance, or provide R programming guidance.
Why this skill is useful
Provides specific patterns and performance optimization techniques for modern R development that the AI wouldn't reliably generate on its own.
What it needs
Requires bench, dtplyr, furrr, profvis installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
R Development This skill provides comprehensive guidance for modern R development, emphasizing current best practices with tidyverse, performance optimization, and professional package development. Core Principles 1. Use modern tidyverse patterns - Prioritize dplyr 1.1+ features, native pipe, and current APIs 2. Profile before optimizing - Use profvis and bench to identify real bottlenecks 3. Write readable code first - Optimize only when necessary and after profiling 4. Follow tidyverse style guide - Consistent naming, spacing, and structure Modern Tidyverse Essentials Native Pipe ( > not %>%) Always use native pipe > instead of magrittr %>% (R 4.1+): Join Syntax (dplyr 1.1+) Use joinby() for all joins: Control match behavior: Per-Operation Grouping with .by Use .by instead of groupby() > ... > ungroup(): Column Operations Use modern column selection and transformation functions: rlang Metaprogramming For comprehensive rlang patterns, see references/rlang-patterns.md. Quick Reference {{}} - Forward function arguments to data-masking functions !! - Inject single expressions or values !!! - Inject multiple arguments from a list .data[[]] - Access columns by name (character vectors) pick() - Select columns inside data-masking functions Example function with embracing: Performance Optimization For detailed performance guidance, see references/performance.md. Key Strategies 1. Profile first: Use profvis::profvis() and bench::mark() 2. Vectorize operations: Avoid loops when vectorized alternatives exist 3. Use dtplyr: For large data operations (lazy evaluation with data.table backend) 4. Parallel processing: Use furrr::futuremap() for parallelizable work 5. Memory efficiency: Pre-allocate, use appropriate data types Quick example: Package Development For complete package development guidance, see references/package-development.md. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/r-development