R Style Guide & Best Practices

•
1.9k
•

Enforces consistent R coding standards, naming conventions, and function design patterns for cleaner, more maintainable code.

This skill provides Claude with a comprehensive framework for writing high-quality R code, following modern standards like the Tidyverse style guide. It covers essential syntax rules including snake_case naming, indentation, and spacing, while extending into advanced function design and robust error handling using the cli package. It is particularly valuable for researchers and data scientists who need to ensure their scripts are reproducible, readable, and aligned with industry-standard best practices for empirical research.

주요 기능

01Implements Tidyverse-consistent function design and data-first argument structures
02Provides advanced error handling guidance using cli::cli_abort() for user-friendly messaging
031,857 GitHub stars
04Standardizes naming conventions using snake_case and verb/noun distinctions
05Enforces layout rules including 80-character line limits and pipe formatting
06Guides script organization from package loading to main logic execution

사용 사례

01Developing custom R packages with consistent API design and robust error handling
02Refactoring legacy R scripts to meet modern readability and reproducibility standards
03Standardizing code style across collaborative research teams and social science projects