Day 21: rhub - Multi-Platform Testing

Test your package on multiple platforms before CRAN submission.

Resources: https://r-hub.github.io/rhub/

#rstats #RPackageAdvent2025

1/ CRAN Tests Everywhere: Windows, macOS, Linux, multiple flavors. Your package must work on all. rhub lets you test before submission.

2/ Run CRAN Checks:
rhub::check_for_cran()

Tests on Debian, Windows, Fedora. Same platforms CRAN uses. Catch platform-specific issues early.

3/ Platform-Specific:

rhub::check_on_windows()
rhub::check_on_macos()
rhub::check(platform = "debian-clang-devel")

Target specific platforms where you expect issues.

4/ Before Submission: Run rhub + GitHub Actions. If both pass, CRAN will likely accept. Confidence before submission reduces stress.

5/ The Bottom Line: CRAN rejection wastes weeks. rhub finds platform issues in hours. Test thoroughly, submit confidently.