talira

devtools

R functions that make developing R packages easier

open sourceMITfree

devtools is an R package of functions for the everyday work of developing R packages. load_all() simulates installing and reloading a package while you work, document() regenerates the man pages and NAMESPACE, test() reloads the code and runs its testthat tests, and test_coverage() measures coverage with covr. It also builds and installs packages, installs others from GitHub, GitLab, Bitbucket, git, SVN, a URL or a specific CRAN version, runs R CMD check locally or on win-builder and macbuilder, and handles the mechanics of submitting to CRAN. The R Packages book (r-pkgs.org) teaches package development around it.

Problems it solves

  • speed up the edit, reload and test loop while writing an R package
  • check my R package and submit it to CRAN
  • install an R package straight from GitHub

Features

  • load_all() reloads a package in development without reinstalling
  • document() regenerates man pages and NAMESPACE
  • test() and test_coverage() run testthat tests and covr coverage
  • install_github(), install_gitlab(), install_version() and other installers
  • check() plus win-builder and macbuilder checks
  • release() and submit_cran() for CRAN submission

Alternatives

The same job

These do what devtools does.

  1. remotes Install R packages from GitHub, GitLab, Bitbucket, Bioconductor and git
  2. pak Fast, safe R package installation from CRAN, Bioconductor, GitHub and git
  3. usethis Automate R package and project setup

Compare devtools with the top 3