Final Tips & Resources
🎉 You’ve created, documented, built, and installed your first R package!
Whether you’re building internal tools, publishing reusable code, or documenting datasets for analysis, you now have a powerful foundation.
Here are some ideas for continuing your package development journey:
Add Tests
Use {testthat}
to write tests for your functions:
::use_testthat()
usethis::use_test("add_numbers") usethis
Tests help you:
- Catch bugs early
- Document edge cases
- Build confidence before sharing
Add Continuous Integration
Automate package checks and tests on GitHub with GitHub Actions:
::use_github_action_check_standard() usethis
This gives you automatic feedback every time you push a commit.
Submit to CRAN (Optional!)
If you want to publish on CRAN:
- Carefully follow R Packages 2e
- Tidy up your
DESCRIPTION
- Make sure
check()
has 0 errors, 0 warnings, 0 notes - Submit via https://cran.r-project.org/submit.html
Not required — many useful packages live on GitHub forever.
Recommended Reading
R Packages, 2nd Edition
Hadley Wickham & Jenny Bryan
https://r-pkgs.org
The definitive guide. Use it as your reference!
Package Development Tools
More Learning
- Advanced R — deep dive into R internals
- Happy Git with R — if you’re new to Git
Community
- 📣 RStudio Community
- 🐦 #rstats
- 💬 Posit Discord (formerly RStudio)
Ask questions, share your packages, and keep learning!
Thank You!
You’re now equipped to:
✅ Build packages
✅ Write reusable functions
✅ Share datasets
✅ Document everything
Keep your functions in packages. Future you will thank you.
Happy building! 🧱