2025-09-29 –, 8.44
Do you have R code you want to share? You can transform your R code into a shareable tool by developing it into an R package. This course bridges the gap between writing isolated R functions and creating documented packages that can be easily distributed, and is designed for those who might be curious about R package development but haven't had the time or guidance to get started.
You'll learn the essential tools of the trade: usethis and devtools for package structure, roxygen2 for documentation, testthat for testing, and Git/GitHub for sharing your work.
Whether you're looking to organise your personal code collection or contribute to the broader R ecosystem, this course provides the foundation you need.
Prerequisites:
- Comfortable with some R fundamentals (data types, functions, reading data).
- Experience writing basic R scripts.
- No prior experience with package development required.
Learning Outcomes: By the end of this course, you will be able to:
- Create the basic structure of an R package.
- Manage dependencies with
usethisanddevtools. - Create documentation with
roxygen2. - Write and run unit tests with
testthatto verify package functionality. - Use Git and GitHub to put your R package online.
- Understand next steps for advanced package development, including:
- Automatically run tests with continuous integration via GitHub Actions.
- Make your R package easily installable with the R Universe.
- Create professional package websites using
pkgdown.
Dr. Nicholas (Nick) Tierney is a Research Software Engineer, and freelance consultant with a PhD in Statistics who specialises in data analytics, R package development, and teaching. He wrote his first R package in 2015, neato, after being inspired by Dr. Hilary Parker's blog post "writing an R package from scratch".
His academic work has produced several widely-used packages (see his github). During his research fellowship at Monash University with Professor Dianne Cook, he developed tools for exploratory data analysis including visdat, naniar, and brolgar . He then went on to work with Professor Nick Golding at The Kids Research Institute Australia, working as a research software engineer to translate research methods into R packages. Specifically, conmat a tool used in pandemic modelling, and he maintained Nick Golding's greta R package for statistical modelling using Google's tensorflow.
Beyond coding, Nick actively writes about R related projects at his blog, "credibly curious". When not coding, Nick enjoys outdoor adventures and hiked the entire Pacific Crest Trail in 2023, documenting his journey at njt.micro.blog.