Skip to content

Tools for R programmers

Code formatting

  • styler: formats R source files, packages, and supported literate-programming documents according to a configurable style.

Linting and static analysis

  • lintr: static analysis for style, syntax, and selected semantic problems. It can be run from an editor, the R console, or continuous integration.

Package and environment management

  • renv: creates a project-local R library and lockfile so that package versions can be restored on another system. It records the R version but does not install R itself or manage compilers and system libraries.
  • pak: fast package installer with dependency resolution and support for CRAN, Bioconductor, Git repositories, URLs, and local packages. It complements rather than replaces an renv lockfile.

Testing

Package development and documentation

  • usethis: automates repetitive project and package setup tasks.
  • devtools: convenient interface to common R package development, checking, testing, and documentation tasks.
  • roxygen2: generates R package reference documentation and namespace information from comments beside the code.

Profiling

  • profvis: interactive visualization of profiling data collected by R's sampling profiler.

Language interoperability

  • Rcpp: allows you to write C++ code that can be called from R.