R Best Practices

Community

Write 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 for loops by using vectorized operations and functions like apply or data.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 styler and lintr.
  • 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 required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.