creating-r-package

Create new R packages using usethis and devtools workflows.

19|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/arthurgailes/awesome-r-skills --skill creating-r-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-r-package
Source: https://github.com/arthurgailes/awesome-r-skills/tree/main/skills/creating-r-package
Command: npx skills add https://github.com/arthurgailes/awesome-r-skills --skill creating-r-package

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating new R packages, guiding users through setting up the correct structure and adopting modern development workflows to avoid common pitfalls.

Core Features & Use Cases

  • Package Initialization: Sets up a new R package with essential files and configurations using usethis.
  • Development Workflow: Integrates with devtools for efficient iteration, documentation, testing, and checking.
  • Use Case: When starting a new R project intended for distribution or collaboration, use this Skill to establish a robust and maintainable package structure from the outset.

Quick Start

Create a new R package named 'my_new_package' and set up its essential components.

Frequently Asked Questions about creating-r-package

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

FAQPage Schema
How do I set up the correct structure for a new R package?

You can create an R package from scratch by using modern `usethis` and `devtools` workflows, which guide you through initialization, documentation, and testing protocols to avoid common pitfalls.

What is the best way to manage dependencies and write documentation for an R package?

The best way to manage dependencies and write documentation is through the integrated `devtools` workflow, which facilitates efficient iteration and helps implement standard testing protocols.

Can I use this workflow to prepare an R package for CRAN submission?

Yes, this R package development workflow adheres to best practices specifically for CRAN submission and package maintenance, ensuring your package meets required checks and standards.

Do I need devtools and usethis to build an R package from scratch?

Yes, adopting the modern `devtools` and `usethis` workflows is required to utilize this Skill's full capabilities for setting up package structure, managing dependencies, and running checks.

When should I use a structured workflow for R package development?

You should use a structured R package development workflow when starting a new R project intended for distribution or collaboration, ensuring you establish a robust structure from the outset.