Indrajeet Patil
- Code of Conduct
- Swiss army knives 🛠
- Package templates 💀
- Naming things 🧸
- Working with package components
- Package configuration
- Package management tools
- Documentation 📚
- Documentation quality ✒️
- Logging 📝
- Unit testing 🧪
- Code/Document Formatting 🧽
- Code analysis 🗂⏱
- Refactoring
- Code performance ⏱️
- Reproducible Environments 🌐
- Dependency Management ⚖️
- CRAN/Bioconductor checks 📬
- Usage 🙈
- CI/CD 📟
- Security/Privacy 👮
- Build systems
- Debugging 🔭
- Input validation 🔬
- Package metadata 🖨
- Reverse dependency checks 📡⚰️
- Gratitude 🙏💌
- Integration with other languages 🔗
- Upkeep 🧹
- Sundry 🗒
- Session information
A curated list of awesome tools to assist 📦 development in R programming language.
Tip
- 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.
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 the package is meant to be submitted to CRAN or Bioconductor.
-
{pkgkitten}
(useful for creating new packages for R) -
{rcompendium}
(to make the creation of R package/research compendium easier) -
{r.pkg.template}
(an opinionated R package template with CI/CD built-in) -
{skeletor}
(An R Package Skeleton Generator)
-
{fusen}
(to build a package from RMarkdown files) -
{litr}
(to write a complete R package in a single R markdown document)
-
{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)
-
{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)
-
{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)
-
{config}
(to manage environment specific configuration values) -
{dotenv}
(to load environment variables from.env
files) -
{options}
(provides simple mechanisms for defining and interpreting package options) -
{potions}
(to update and retrieve options, either in the workspace or during package development, without overwriting global options)
{pkgcache}
(to cache ‘CRAN’-like metadata and packages)
-
{roxygen2}
(to generate R package documentation from inline R comments) -
{Rd2roxygen}
(in case you inherit a project where documentation was not written using{roxygen2}
) -
{rdoxygen}
(to create Doxygen documentation for R package C++ code) -
{roxyglobals}
(to generate global variables with{roxygen2}
documentation) -
{sinew}
(generate{roxygen2}
skeletons) -
{autoimport}
(to automatically generate @importFrom roxygen tags from R files) -
{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)
-
{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) -
{mathml}
(translates R expressions to ‘MathML’ or ‘MathJax’ so that they can be rendered in HTML manual and Shiny apps)
-
{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) -
{R.rsp}
(for incorporating static and dynamic vignettes) -
{RmdConcord}
(to provide support for concordances in R Markdown files) -
{prettydoc}
(creates lightweight yet pretty vignettes) -
{readme2vignette}
(to convert README to vignette during package installation)
{learnr}
(to turn any R Markdown document into an interactive tutorial)
-
{pkgdown}
(static website for package documentation) -
{gitdown}
(software changes as a gitbook) -
{altdoc}
(usedocute
,docsify
, orMkDocs
to create a static website for package documentation)
{potools}
(for translating messages and checking the “health” of the messaging corpus)
{lifecycle}
(to manage the life cycle of exported functions)
-
{badger}
(to query information and generate badges for use inREADME
) -
{badgen}
(provides bindings tobadgen
to generate beautiful ‘svg’ badges in R without internet access) -
{hexSticker}
(helper functions for creating reproducible hexagon sticker purely in R) -
{hexFinder}
(to scavenge the web for possible hex logos for packages) -
hexwall
(to create a wall of hexstickers)
{xaringan}
(an RMarkdown output format forremark.js
slides)
{bookdown}
(authoring framework for books and technical documents with R Markdown)
-
{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)
-
{logger}
(provides a flexible and extensible logging framework for R) -
{loggit}
(effortless newline-delimited JSON logger, with two primary log-writing interfaces) -
{log4r}
(logging in R based on the widely-emulated ‘log4j’ system and etymology) -
{lgr}
(a flexible, feature-rich yet light-weight logging framework based on ‘R6’ classes) -
{rsyslog}
(write messages to the ‘syslog’ system logger API) -
{logging}
(pure R implementation of the ubiquitous ‘log4j’ package) -
{lumberjack}
(to log changes in data)
-
{testthat}
(a testing framework for R that is easy to learn and use; also provides snapshot testing) -
{patrick}
(for parameterized unit testing with{testthat}
) -
{testdat}
(a family of functions and reporting tools focused on checking of data) -
{tinytest}
(zero-dependency unit testing framework that installs tests with the package) -
{tinysnapshot}
(snapshots for unit tests using the{tinytest}
framework) -
{tinytest2JUnit}
(to convert{tinytest}
output to JUnit XML needed by CI/CD) -
{checkmate.tinytest}
(additional expectations for{tinytest}
framework) -
{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}
(to inline{testthat}
tests with{roxygen2}
) -
{doctest}
(to write{testthat}
tests by adding{roxygen2}
tags) -
{exampletestr}
(tests based on package examples) -
{roxut}
(to write the unit tests in the same file as the function) -
{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) -
{cucumber}
(an implementation of the Cucumber testing framework in R) -
{quickcheck}
(provides property-based testing in{testthat}
framework)
-
{httptest}
/{httptest2}
(a test environment for HTTP requests in R) -
{webfakes}
(to fake web apps for HTTP testing) -
{vcr}
(to record HTTP requests and responses on disk and replay them for the unit tests) -
{dittodb}
(makes testing against databases easy)
-
{vdiffr}
(for visual regression testing with{testthat}
) -
{gdiff}
(for performing graphical difference different package or R versions)
-
{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)
{mutant}
(mutation testing for R)
-
{shinytest}
(testing Shiny apps) -
{shinytest2}
(testing Shiny apps using a headless Chromium web browser) -
{shinyloadtest}
(to load test deployed Shiny apps)
-
{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) -
{ttdo}
(provides ‘diff’-style comparison of R objects for{tinytest}
framework)
-
{styler}
(to format code according to a style guide) -
{stylermd}
(to format text in Markdown documents) -
{formatR}
(to format R source code) -
{RFormatter}
(extension of{formatR}
with slightly improved heuristics) -
{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}
(provides standard formatting styles for Bioconductor PDF and HTML documents) -
AlignAssign
(RStudio addin that aligns the assignment operators within a highlighted area) -
{snakecase}
(helpful for having consistent case while naming objects in the package) -
{dotInternals}
(to distinguish non-exported package functions by prepending their names with a dot)
-
{codetools}
(code analysis tools for R) -
{goodpractice}
(Swiss army knife for good practices) -
{inteRgrate}
(provides an opinionated set of rules for R package development) -
{checklist}
(to provide an elaborate and strict set of checks for R packages and R code) -
{pkgcheck}
(checks if package follows good practices recommended for packages in therOpenSci
ecosystem) -
{pkgstats} (a static code analysis tool)
-
{rchk}
(provides several bug-finding tools that look for memory protection errors in C source code using R API) -
{sourcetools}
(tools for reading, tokenizing, and parsing R code) -
{precommit}
(git hooks for common tasks like formatting files, spell checking, etc.)
{PaRe}
(reviews other packages during code review by looking at their dependencies, code style, code complexity, and how internally defined functions interact with one another)
-
{covr}
(to compute code coverage) -
{covrpage}
(to include summaryREADME
of code coverage and more detailed information about tests) -
{covtracer}
(provides tools for contextualizing tests)
-
{lintr}
(static code analysis) -
{flint}
(to fix lints found by{lintr}
) -
{roxylint}
(to lint{roxygen2}
-generated documentation) -
{checkglobals}
(to check R-packages for globals and imports) -
{CodeDepends}
(analysis of R code for reproducible research and code view) -
{adaptalint}
(infer code style from one package and use it to check another) -
{box.linters}
(linters for{box}
modules) -
{roger}
(provides tools for grading the coding style and documentation of R scripts) -
{cleanr}
(tests code for some of the most common code layout flaws)
-
{cyclocomp}
(to index the complexity of a function) -
{pkgGraphR}
(to visualize the relationship between functions in an R package)
-
{dupree}
(identifies code blocks that have a high level of similarity within a set of R files) -
{rscc}
(provides source code similarity evaluation by variable/function names) -
{SimilaR}
(quantifies the similarity of the code-base of R functions by means of program dependence graphs)
-
{memtools}
(to solve memory leaks) -
{sanitizers}
(to test for memory violations and other undefined behaviour) -
{cppcheckR}
(to checkC
andC++
code usingCppcheck
)
{cloc}
(counts blank lines, comment lines, and physical lines of source code in source files)
{refactor}
(to check speed and performance of both the original and refactored version of code)
-
{bench}
(provides high precision benchmarks for R expressions) -
{microbenchmark}
(infrastructure to accurately measure and compare the execution time of R expressions) -
{tictoc}
(functions for timing R scripts) -
{touchstone}
(to benchmark pull requests) -
{benchmarkme}
(to crowd-source system benchmarking) -
{comparer}
(to compare the results of different code chunks)
-
{profvis}
(to profile and visualize profiling data) -
{proffer}
(to create friendlier, faster visualizations for profiling data) -
{jointprof}
(to profile packages with native code in C, C++, Fortran, etc.) -
{xrprof}
(an external sampling profiler)
-
{renv}
(to create project-local environments) -
{rix}
(to create reproducible data science environments using the Nix package manager) -
{bspm}
(to enable binary package installations via Linux distribution’s package manager) -
{rspm}
(to access Posit Public Package Manager for binary package installations on Linux) -
{groundhogr}
(to load packages and their dependencies as available on chosen date on CRAN)
-
{containerit}
(to package R script/session/workspace and all dependencies as aDocker
container by generating a suitableDockerfile
) -
{dockerfiler}
(to generateDockerfile
for R projects) -
{pracpac}
(a{usethis}
-like interface to create Docker images from R packages under development) -
{usethat}
(to automate analytic project setup tasks)
-
{pkgdepends}
(to find recursive dependencies of from various sources) -
{deepdep}
(to visualize and explore package dependencies) -
{itdepends}
(to assess usage, measure weights, visualize proportions, and assist removal of dependencies) -
{DependenciesGraphs}
(to visualize package dependencies) -
{DependencyReviewer}
(to investigate packages during code review by looking at their dependencies) -
{pkgdepR}
(to visualize dependencies between functions for a group of R packages) -
{deps}
(to manage source code dependencies by decorating R code with roxygen-style comments) -
{pkgnet}
(to build a graph representation of a package and its dependencies) -
{functiondepends}
(to find functions in an unstructured directory and explore their dependencies) -
{pkgndep}
(checks the heaviness of the packages used) -
{attachment}
(to deal with package dependencies during package development)
-
{rcmdcheck}
(to runR CMD check
form R programmatically) -
{BiocCheck}
(to run Bioconductor-specific package checks) -
{rhub}
(to runR CMD check
on CRAN architectures) -
{checked}
(systematically runR CMD check
against multiple packages) -
{checkhelper}
(to help avoid problems with CRAN submissions) -
{extrachecks}
(to run some additional CRAN checks) -
{foghorn}
(to check for results and submission portal status) -
{urlchecker}
(to checks for URL rot)
-
{cranlogs}
(for computing CRAN download counts) -
{packageRank}
(for visualizing CRAN download counts) -
{Visualize.CRAN.Downloads}
(to visualize CRAN downloads) -
{dlstats}
(provides download statistics for packages)
CI/CD: continuous integration and either continuous delivery or continuous deployment
-
actions
(provides GitHub Actions relevant for R) -
{gha}
(Useful functions for GitHub Actions) -
actions-sync
(to manage GitHub Actions workflows across repositories) -
{rworkflows}
(GitHub Actions to automates testing, documentation website building, and containerized deployment) -
r-appveyor
(for AppVeyor) -
{tic}
(for Circle CI and GitHub Actions) -
{jenkins}
(for Jenkins CI) -
{cronR}
(to schedule R scripts/processes with the cron scheduler)
{fakemake}
(to mock Unix Make build system in case it is unavailable)
-
{debugme}
(provides helpers to specify debug messages as special string constants, and control debugging of packages via environment variables) -
{debugr}
(tools to print out the value of R objects/expressions while running an R script) -
{winch}
(provides stack traces for call chains that cross between R and C/C++ function calls) -
{flow}
(to visualize as flow diagrams the logic of functions, expressions, or scripts, which can ease debugging) -
{boomer}
(provides debugging tools to inspect the intermediate steps of a call)
-
{chk}
(to check user-supplied function arguments) -
{checkmate}
(fast and versatile argument checks) -
{assertthat}
(to declare the pre and post conditions that you code should satisfy and to produce friendly error messages) -
{assertive}
(provides readable check functions to ensure code integrity) -
{valaddin}
(functional input validation) -
{dreamerr}
(to check the arguments passed to a function and to offer informative error messages) -
{erify}
(to check arguments and generate readable error messages)
-
{assertr}
(to verify assumptions about data early) -
{ensurer}
(to ensure values are as expected at runtime) -
{validate}
(to check whether data lives up to expectations based on the domain-specific knowledge)
-
{codemetar}
(provides utilities to generate, parse, and modifycodemeta.jsonld
files automatically for R packages), or{codemeta}
(a leaner version of{codemetar}
) -
{cffr}
(provides utilities to generate, parse, modify and validateCITATION.cff
files automatically for R packages) -
{citation}
(createsCITATION.cff
from R package metadata) -
{pkgapi}
(to create the map of function calls in a package) -
{riskmetric}
(provides a collection of risk metrics to evaluate the quality of R packages) -
{packagemetrics}
(for comparing among packages) -
{devtoolbox}
(to create a summary report for R package and to extract dependency statistics in a tidy data frame) -
{pkgattrs}
(useful for getting information on the contents of any R package) -
{foreman}
(for unpacking, interrogating and subsetting R packages) -
{sessioninfo}
(to include R session information)
-
{revdepcheck}
(for automated, isolated, reverse dependency checking) -
{xfun}
(specifically,xfun::rev_check()
)
To thank the contributors or maintainers of packages you rely on.
-
{thankr}
(to find out who maintains the packages you are using) -
{allcontributors}
(to help acknowledge all contributions)
{TODOr}
(RStudio addin to list things that you need to do or change)
-
{lazyData}
(supplies a lazy data loading for packages with datasets that do not provideLazyData: true
) -
{pkglite}
(tools to represent and exchange R package source code as text files) -
{gpttools}
(RStudio addin that allows using chatGPT to automate writing documentation, tests, etc.) -
{rfold}
(to work with many R folders within an R package) -
{many}
(to create R packages from many directories) -
{prefixer}
(prefix function with their namespace ) -
{onetime}
(for package authors to run code only once for a given user on a given computer) -
{rstudioapi}
(to conditionally access the RStudio API from CRAN packages) -
{rcheology}
(to access data on base packages for previous versions of R) -
{gitignore}
(to fetch gitignore templates) -
{DIZutils}
(helpers for packages dealing with database connections) -
{dang}
(Miscellaneous utilities for CRAN packages)
Session details
─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.4.2 (2024-10-31)
os Ubuntu 22.04.5 LTS
system x86_64, linux-gnu
hostname fv-az770-281
ui X11
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz UTC
date 2024-12-29
pandoc 3.6.1 @ /opt/hostedtoolcache/pandoc/3.6.1/x64/ (via rmarkdown)
quarto 1.7.5 @ /usr/local/bin/quarto
─ Packages ───────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
base * 4.4.2 2024-10-31 [3] local
cli 3.6.3 2024-06-21 [1] RSPM
clipr 0.8.0 2022-02-22 [1] RSPM
compiler 4.4.2 2024-10-31 [3] local
datasets * 4.4.2 2024-10-31 [3] local
desc 1.4.3 2023-12-10 [1] RSPM
details * 0.3.0 2022-03-27 [1] RSPM
digest 0.6.37 2024-08-19 [1] RSPM
evaluate 1.0.1 2024-10-10 [1] RSPM
fastmap 1.2.0 2024-05-15 [1] RSPM
graphics * 4.4.2 2024-10-31 [3] local
grDevices * 4.4.2 2024-10-31 [3] local
grid 4.4.2 2024-10-31 [3] local
htmltools 0.5.8.1 2024-04-04 [1] RSPM
httr 1.4.7 2023-08-15 [1] RSPM
jsonlite 1.8.9 2024-09-20 [1] RSPM
knitr 1.49 2024-11-08 [1] RSPM
magrittr 2.0.3 2022-03-30 [1] RSPM
methods * 4.4.2 2024-10-31 [3] local
png 0.1-8 2022-11-29 [1] RSPM
R6 2.5.1 2021-08-19 [1] RSPM
rlang 1.1.4 2024-06-04 [1] RSPM
rmarkdown 2.29 2024-11-04 [1] RSPM
sessioninfo 1.2.2.9000 2024-11-03 [1] Github (r-lib/sessioninfo@37c81af)
stats * 4.4.2 2024-10-31 [3] local
tools 4.4.2 2024-10-31 [3] local
utils * 4.4.2 2024-10-31 [3] local
withr 3.0.2 2024-10-28 [1] RSPM
xfun 0.49 2024-10-31 [1] RSPM
xml2 1.3.6 2023-12-04 [1] RSPM
yaml 2.3.10 2024-07-26 [1] RSPM
[1] /home/runner/work/_temp/Library
[2] /opt/R/4.4.2/lib/R/site-library
[3] /opt/R/4.4.2/lib/R/library
* ── Packages attached to the search path.
──────────────────────────────────────────────────────────────────────────────