Day 22: S3, S4, and S7 Object Systems
Create robust object-oriented interfaces with R's object systems.
Pro Tip: Use S3 for simple classes, S4 for complex validation, S7 for modern OOP.
Resources: https://rconsortium.github.io/S7
Day 22: S3, S4, and S7 Object Systems
Create robust object-oriented interfaces with R's object systems.
Pro Tip: Use S3 for simple classes, S4 for complex validation, S7 for modern OOP.
Resources: https://rconsortium.github.io/S7
Day 22: S3, S4, and S7 Object Systems
Create robust object-oriented interfaces with R's object systems.
Pro Tip: Use S3 for simple classes, S4 for complex validation, S7 for modern OOP.
Resources: https://rconsortium.github.io/S7
Day 12: README.Rmd Automation
Create dynamic READMEs that stay up-to-date with your code.
Setup:
usethis::use_readme_rmd()
Include these sections:
• Installation instructions
• Basic usage example
• Lifecycle badges
• Build status badges
Keep it fresh:
# Add to .github/workflows/
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'
Day 15: Snapshot Testing with testthat
Test complex outputs that are hard to specify exactly.
Text snapshots:
test_that("error messages are informative", {
expect_snapshot(my_function(bad_input), error = TRUE)
})
Pro Tip: Review snapshot changes carefully - they capture everything, including whitespace and formatting.
Day 15: Snapshot Testing with testthat
Test complex outputs that are hard to specify exactly.
Text snapshots:
test_that("error messages are informative", {
expect_snapshot(my_function(bad_input), error = TRUE)
})
Pro Tip: Review snapshot changes carefully - they capture everything, including whitespace and formatting.
Day 12: README.Rmd Automation
Create dynamic READMEs that stay up-to-date with your code.
Setup:
usethis::use_readme_rmd()
Include these sections:
• Installation instructions
• Basic usage example
• Lifecycle badges
• Build status badges
Keep it fresh:
# Add to .github/workflows/
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'
Day 7: roxygen2 Advanced Tags and Cross-References 📝
Master documentation with advanced roxygen2 features, with markdown-style writing! 🎯
💡 Pro Tip: Use @inheritDotParams to inherit ... parameter documentation.
📚 Resources: https://roxygen2.r-lib.org
Day 7: roxygen2 Advanced Tags and Cross-References 📝
Master documentation with advanced roxygen2 features, with markdown-style writing! 🎯
💡 Pro Tip: Use @inheritDotParams to inherit ... parameter documentation.
📚 Resources: https://roxygen2.r-lib.org
Day 1: usethis - Project Setup Automation 🎯
The usethis package is your best friend for automating repetitive package development tasks! 🤖
💡 Pro Tip: Set up your global options once with usethis::edit_r_profile() to add your name, email, and preferred license.
📚 Resources: https://usethis.r-lib.org
#RPackageDev #RStats #usethis #RPackageAdvent2025 📦
🎄 ANNOUNCEMENT: R Package Development Advent Calendar 2025! 🎄
Starting December 1st, I'm launching a 25-day journey through modern R package development. But this isn't just another tips series - here's why you should follow along 🧵
The Problem: R package development can feel overwhelming. Between documentation, testing, CI/CD, and CRAN submission, there are dozens of tools to learn.
Day 1: usethis - Project Setup Automation 🎯
The usethis package is your best friend for automating repetitive package development tasks! 🤖
💡 Pro Tip: Set up your global options once with usethis::edit_r_profile() to add your name, email, and preferred license.
📚 Resources: https://usethis.r-lib.org
#RPackageDev #RStats #usethis #RPackageAdvent2025 📦
🎄 ANNOUNCEMENT: R Package Development Advent Calendar 2025! 🎄
Starting December 1st, I'm launching a 25-day journey through modern R package development. But this isn't just another tips series - here's why you should follow along 🧵
The Problem: R package development can feel overwhelming. Between documentation, testing, CI/CD, and CRAN submission, there are dozens of tools to learn.