Skip to content
Back to skills

R Dev Package

ASecurity

R package development with devtools, usethis, roxygen2. Use for creating and maintaining R packages.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 4, 2026
datagitdocumentation

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill r-dev-package --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of R Dev Package?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for R Dev Package
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-r-dev-package/badge)](https://www.skillsdirectory.com/skills/leolin990405-r-dev-package)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: r-dev-package
description: R package development with devtools, usethis, roxygen2. Use for creating and maintaining R packages.
---

# R Package Development

Creating R packages.

## usethis Setup

```r
library(usethis)

# Create package
create_package("mypackage")

# Add components
use_r("function_name")
use_test("function_name")
use_data(dataset)
use_data_raw("dataset")

# Documentation
use_readme_rmd()
use_vignette("intro")
use_news_md()
use_pkgdown()

# Dependencies
use_package("dplyr")
use_pipe()
use_tibble()

# Git/GitHub
use_git()
use_github()
use_github_action_check_standard()

# License
use_mit_license()
use_gpl3_license()
```

## devtools Workflow

```r
library(devtools)

# Development
load_all()        # Load package
document()        # Generate docs
test()            # Run tests
check()           # R CMD check

# Build
build()
install()

# Continuous
dev_mode()
```

## roxygen2 Documentation

```r
#' Title of function
#'
#' Description of what the function does.
#'
#' @param x Description of x
#' @param y Description of y
#' @return Description of return value
#' @export
#' @examples
#' my_function(1, 2)
#'
#' @seealso \code{\link{other_function}}
#' @importFrom dplyr filter select
my_function <- function(x, y) {
  # code
}

#' @rdname my_function
#' @export
my_function2 <- function(x) {
  # code
}
```

## DESCRIPTION

```
Package: mypackage
Title: What the Package Does
Version: 0.1.0
Authors@R: person("Name", "Last", email = "email@example.com", role = c("aut", "cre"))
Description: Longer description of what the package does.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports:
    dplyr,
    ggplot2
Suggests:
    testthat (>= 3.0.0)
Config/testthat/edition: 3
```

Files in this skill

  • SKILL.md1.7 KB
  • box/SKILL.md3.3 KB
  • covr/SKILL.md1.7 KB
  • devtools/SKILL.md1.9 KB
  • lintr/SKILL.md3.5 KB
  • pkgdown/SKILL.md1.4 KB
  • pryr/SKILL.md2.4 KB
  • rcmdcheck/SKILL.md1.5 KB
  • renv/SKILL.md3.1 KB
  • roxygen2/SKILL.md1.5 KB
  • styler/SKILL.md3.3 KB
  • testthat/SKILL.md2.2 KB
  • usethis/SKILL.md1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.