awesome-r-pkgtools
title
format
toc
keep-md
date-modified
author
keywords
Awesome R Package Development Tools
gfm
true
true
2022-12-25
Indrajeet Patil
r packages
software development
software engineering
r
A curated list of awesome tools to assist ๐ฆ development in R programming language.
:::{.callout-tip}
What is included?
- Only tools helpful for package development are included, and not other resources (e.g. books).
- All relevant tools are included, irrespective of their availability on CRAN/Bioconductor.
-
Tools which are part of publicly archived/retired GitHub repositories are not included.
:::
If you wish to suggest any additional tools, please make a PR or create an issue here.
Code of Conduct
Please note that the awesome-r-pkgtools
project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Tools useful across all stages of package development (some of these are meta-packages and their component packages are also included in respective sections for the sake of completeness), irrespective of whether package is meant to be submitted to CRAN or to Bioconductor.
Generic
-
{pkgkitten}
(useful for creating new packages for R) -
{rcompendium}
(to make the creation of R package/research compendium easier) -
{skeletor}
(An R Package Skeleton Generator)
RMarkdown-based
-
{fusen}
(to build a package from RMarkdown files) -
{litr}
(to write a complete R package in a single R markdown document)
Shiny
-
{golem}
(framework for building shiny applications) -
{leprechaun}
(leaner framework for building shiny applications) -
{rhino}
(a framework to build high quality, enterprise-grade Shiny apps at speed)
Meta-packages
-
{pkgverse}
(for package meta-verse) -
{metamakr}
(for package meta-verse)
-
{available}
(to check if a package name is available to use) -
{collidr}
(to check for namespace collisions) -
{changer}
(to change the name of an existing R package)
Working with package components
-
{rprojroot}
(accessing files w.r.t. package root directory) -
{desc}
(manipulatingDESCRIPTION
files) -
{withr}
(to manage package side effects by safely and temporarily modifying global states) -
{pkgload}
(to simulate the process of installing and loading a package) -
{pkgbuild}
(to find tools needed to build packages)
Package configuration
-
{config}
(to manage environment specific configuration values)
Package management tools
-
{pkgcache}
(to cache ‘CRAN’-like metadata and packages)
Manual
-
{roxygen2}
(to generate R package documentation from inline R comments) -
{Rd2roxygen}
(in case you inherit a project where documentation was not written using{roxygen2}
) -
{sinew}
(generate{roxygen2}
skeletons) -
{roclang}
(helpers for diffusing content across function documentation) -
{Rdpack}
(for inserting references, figures, and evaluated examples in Rd docs) -
{roxygen2md}
(to allow Markdown syntax usage in{roxygen2}
documentation) -
{rd2markdown}
(to convert.Rd
package documentation files into markdown files) -
{rd2list}
(converts Rd docs to a human-readable list) -
{pasteAsComment}
(RStudio addin for pasting copied code as roxygen comment) -
roxygen2Comment
(Rstudio addin for adding and remove{roxygen2}
comment)
Math rendering in the manual
-
{katex}
(to convert latex math expressions to HTML for use in package manual pages) -
{mathjaxr}
(provides ‘MathJax’ and macros to enable its use withinRd
files for rendering equations in the HTML help files)
Vignettes
-
{knitr}
(a general-purpose tool for dynamic report generation to be used as a vignette builder for R package vignettes) -
{rmarkdown}
(to convert R Markdown documents to a variety of formats) -
{quarto}
(provides R interface to frequently used operations in the Quarto CLI) -
{prettydoc}
(creates lightweight yet pretty vignettes) -
{learnr}
(to turn any R Markdown document into an interactive tutorial)
Website
-
{pkgdown}
(static website for package documentation) -
{gitdown}
(software changes as a gitbook) -
{altdoc}
(use docute or docsify to create a static website for package documentation)
Translation
-
{potools}
(for translating messages and checking the “health” of the messaging corpus)
Lifecycle
-
{lifecycle}
(to manage the life cycle of exported functions)
Badges and stickers
-
{badger}
(query information and generate badges for using inREADME
andGitHub Pages
) -
{hexSticker}
(helper functions for creating reproducible hexagon sticker purely in R) -
hexwall
(to create a wall of hexstickers)
Presentation
-
{xaringan}
(an RMarkdown output format forremark.js
slides)
Book
-
{bookdown}
(authoring framework for books and technical documents with R Markdown)
Change log and versioning
-
{fledge}
(to streamline the process of updating change logs and versioning R packages developed in git repositories) -
{newsmd}
(utilities to add updates to theNEWS.md
file) -
{autonewsmd}
(to auto-generate change log using conventional commits)
-
{docreview}
(to check quality of docs) -
{spelling}
(to check for spelling mistakes) -
{gramr}
(for grammar suggestions)
General
-
{testthat}
(a testing framework for R that is easy to learn and use; also provides snapshot testing) -
{patrick}
(for parameterized unit testing with{testthat}
) -
{tinytest}
(zero-dependency unit testing framework that installs tests with the package) -
{RUnit}
(a standard Unit Testing framework, with additional code inspection and report generation tools) -
{testit}
(a simple package for testing R packages) -
{realtest}
(a framework unit testing that distinguishes between expected, acceptable, current, fallback, ideal, or regressive behaviours) -
{roxytest}
(inline{testthat}
tests with{roxygen2}
) -
{roxut}
(to write the unit tests in the same file as the function) -
{exampletestr}
(tests based on package examples) -
{unitizer}
(simplifies regression tests by comparing objects produced by test code with earlier versions of those same objects) -
{r-hedgehog}
(property based testing) -
{autotest}
(automatic mutation testing of R packages)
Markdown documents
Shiny applications
-
{shinytest}
(testing Shiny apps) -
{shinytest2}
(testing Shiny apps using a headless Chromium web browser) -
{shinyloadtest}
(to load test deployed Shiny apps)
Web/database applications
-
{httptest}
(a test environment for HTTP requests in R) -
{httptest2}
(the same for{httr2}
package) -
{webfakes}
(provides fake web apps for HTTP testing R packages) -
{dittodb}
(makes testing against databases easy)
Visual regression testing
-
{vdiffr}
(for visual regression testing with{testthat}
) -
{gdiff}
(for performing graphical difference different package or R versions)
Mock testing
-
{mockthat}
(provides a way to mock package function for unit testing, while coping withS3
dispatch) -
{mockr}
(provides a way to mock package function for unit testing) -
{mockery}
(provides a way to mock package function for unit testing and can be used with any testing framework)
Helpers for testing frameworks
-
{testthis}
(RStudio addins for working with files that contain tests) -
{xpectr}
(builds unit tests with the{testthat}
package by providing tools for generating expectations) -
{testdown}
(turn{testthat}
results into a{bookdown}
project)
-
{styler}
(to format code according to a style guide) -
{stylermd}
(to format text in Markdown documents) -
{formatR}
(to format R source code) -
{grkstyle}
(extension package for{styler}
that supports author’s personal code style preferences) -
{codegrip}
(addin for RStudio IDE to reshape R code and navigate across syntactic constructs) -
{BiocStyle}
…