Agent skill
r
R statistical programming for data analysis, visualization, and modeling. Use for .r files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/r
SKILL.md
R
A language and environment for statistical computing and graphics.
When to Use
- Statistical Analysis
- Data Visualization (ggplot2)
- Bioinformatics
- Academic research
Quick Start
print("Hello, World!")
# Vector
x <- c(1, 2, 3, 4, 5)
# Mean
mean(x)
# Data Frame
df <- data.frame(
Name = c("Alice", "Bob"),
Age = c(25, 30)
)
Core Concepts
Vectorization
R operations are designed to work on entire vectors at once, avoiding explicit loops.
x + 1 # Adds 1 to every element in x
Pipe Operator %>%
Used to clean code by passing output of one function as input to the next (Tidyverse).
data %>%
filter(users > 100) %>%
group_by(region) %>%
summarize(total = sum(users))
Best Practices
Do:
- Use the Tidyverse (dplyr, ggplot2) for modern R
- Document functions with Roxygen2
- Use RStudio IDE
Don't:
- Use explicit
forloops if vectorization is possible (performance) - Mix naming conventions (snake_case is preferred in tidyverse)
References
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?