Connect to R-hub, from R

Linux Build Status Windows Build status CRAN RStudio mirror downloads Coverage Status

Run R CMD check on any of the R-hub architectures, from the command line.


R-hub is a multi-platform build and check service for R packages. This packages uses the R-hub API to connect to R-hub and start package checks on various architectures.


Install the package from CRAN:



Validating your email address

To build packages, first you need to validate your email address with validate_email(). The package tries to detect your email address using whoami and the maintainer email listed in DESCRIPTION; and if it fails to do this correctly, you’ll need to specify it.

rhub stores the token permanently on the machine, so you do not need to validate your email again. You can also copy your token to other machines, see list_validated_emails().

Currently you cannot use the token obtained via this function, in the Web UI of R-hub.

Run a package check

check() runs an R CMD check on the package in the specified directory, or specified source R package tarball created by R CMD build or devtools::build(). It defaults to the working directory.

In interactive R sessions, the output of the check is printed to the screen.

Shortcuts for quick checks

These are quick shortcuts that select the right platform:

Shortcut for preparing a CRAN submission

rhub::check_for_cran: Check an R-package on R-hub, for a CRAN submission.

Sanitizers for compiled code

R-hub provides a special Docker image to run Address Sanitizer (ASAN) and Undefined Behavior Sanitizer (UBSAN). This is based on the r-devel-san image of the Rocker project.

This image does not run R CMD check at all, but it runs

  1. package tests,
  2. all manual examples, and
  3. all vignette code

with ASAN and UBSAN enabled.

Note about rhub naming conventions

Most rhub functions’ names start with a verb (check(), list_my_checks()).

Do not confuse rhub::check() and rhub::rhub_check (not a function)! No function name start with rhub_, but there are three exported classes whose name start with rhub_: rhub::rhub_check, rhub::rhub_check_for_cran and rhub::rhub_check_list.


MIT © R Consortium