r-package-development

Plan R package dependencies, API structure, validation, and documentation.

1|Updated May 13, 2026
One-click install
npx skills add https://github.com/impact-initiatives/ana_app --skill r-package-development-impact-initiatives
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-package-development
Source: https://github.com/impact-initiatives/ana_app/tree/main/.claude/.claude/skills/r-package-development
Command: npx skills add https://github.com/impact-initiatives/ana_app --skill r-package-development-impact-initiatives

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps R developers design and ship maintainable packages by covering how to choose dependencies, build a stable API, validate inputs, and ensure testing and documentation quality.

Core Features & Use Cases

  • Dependency strategy: Decide when to add packages vs rely on base R to balance functionality, maintenance cost, and usability.
  • API design patterns: Apply consistent, modern function interfaces using tidyverse principles and type-stable patterns.
  • Testing, documentation, and release readiness: Create robust unit and integration tests, document exported functions with roxygen2, and run checks before release.

Quick Start

Use this guide to plan your next R package by writing your DESCRIPTION, defining your exported vs internal functions, and outlining tests and roxygen documentation before you start coding.

Frequently Asked Questions about r-package-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an R package for production readiness?

Structure an R package for production by planning dependencies, defining exported versus internal functions, writing DESCRIPTION metadata, and implementing validation. This approach ensures maintainable architecture and stable API design for reliable releases.

Should I use base R or tidyverse packages for my R package dependencies?

Choose between base R and tidyverse packages by balancing functionality needs against maintenance cost and usability. Evaluating dependency strategy early prevents bloated package requirements and ensures long-term maintainability.

How do I document exported functions in an R package using roxygen2?

Document exported functions in an R package using roxygen2 by applying consistent documentation rules directly in your code. This generates standard manual pages and ensures API clarity for reliable package usage.

What tests do I need for a production-ready R package?

Production-ready R packages require both unit tests and integration tests to validate inputs and verify functionality. Implementing robust testing alongside a release checklist ensures repeatable validation before shipping.

How do I design a stable API for R package functions?

Design a stable API for R package functions by applying tidyverse principles and type-stable patterns. Separating exported functions from internal helpers creates a consistent, modern interface that users can rely on.

What should be included in an R package release checklist?

An R package release checklist should include running validation checks, verifying roxygen2 documentation, confirming DESCRIPTION metadata, and executing unit and integration tests. This repeatable validation process ensures package reliability before shipping.