The rhub package
Tools for R package developers
Install rhub from CRAN:
pak::pkg_install("rhub")
See the R Consortium runners section for using rhub if your package is not on GitHub.
rhub uses GitHub Actions, which is free for public repositories. For private repositories you also get some minutes for free, depending on the GitHub subscription you have. See About billing for GitHub Actions for details.
Switch to the directory of your package, and call rhub::rhub_setup()
to add the R-hub workflow file to your package.
rhub::rhub_setup()
Run git commit
and git push
to push the workflow file to GitHub.
Run rhub::rhub_doctor()
to check if everything is set up correctly:
rhub::rhub_doctor()
Use rhub::rhub_platforms()
to get a list of supported platforms and checks:
rhub::rhub_platforms()
Run rhub::rhub_check()
to start R-hub v2 checks on GitHub Actions:
rhub::rhub_check()
If you don't want to put your package on GitHub, you can still use the rhub package to run package checks on any supported platform using a shared pool of runners in the https://github.com/r-hub2 GitHub organization.
The process is similar to the first version of R-hub:
Set your working directory to the R package you want to check.
Obtain a token from R-hub, to verify your email address:
rc_new_token()
(You do not need to do this, if you already submitted packages to a previous version of R-hub from the same machine, using the same email address. Call rc_list_local_tokens()
to check if you already have tokens.)
Submit a build with
rc_submit()
Select the platforms you want to use, and follow the instructions and the link provided to see your check results.
rhub_setup()
and rhub_check()
functions instead.rc_submit()
.To avoid these limitations (except for the need for a GitHub account), put your package in a GitHub repository, and use the rhub_setup()
and rhub_check()
functions instead of rc_submit()
and the R Consortium runners.
Please note that the rhub package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
MIT © R Consortium
Useful links