R Best Practices
CommunityWrite cleaner, more efficient R code.
Authorntluong95
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you write more idiomatic, efficient, and maintainable R code by enforcing best practices in package management, vectorization, functional programming, and code style.
Core Features & Use Cases
- Vectorization: Avoid slow
forloops by using vectorized operations and functions likeapplyordata.table. - Functional Programming: Write pure functions without side effects for more predictable and testable code.
- Code Style Enforcement: Adhere to consistent naming conventions, spacing, and formatting using tools like
stylerandlintr. - Memory Management: Optimize memory usage by removing unused objects and reading data efficiently.
- Use Case: When developing a new R package or script, use this Skill to ensure your code follows established standards, making it easier for others (and your future self) to understand and use.
Quick Start
Apply the R Best Practices skill to refactor the provided R script to improve its vectorization and functional programming style.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: R Best Practices Download link: https://github.com/ntluong95/agent-skills-statistics/archive/main.zip#r-best-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.