WOMBAT 2025
  • Schedule
  • Day 1 - Tutorials
  • Day 2 - Workshop
  • Register
    • Tutorials
    • Workshop
  • Contact
  • About
    • Code of Conduct
    • Organising Committee

Registrations are now open!

Introduction to R packages

This session is designed for R users interested in turning their standalone code into shareable R packages but have not yet ventured into package development. Key topics include structuring R packages, managing dependencies with usethis and devtools, documenting code with roxygen2, testing with testthat, sharing packages using Git and GitHub, and an introduction to advanced steps like continuous integration, R Universe deployment, and website creation with pkgdown.
Published

September 29, 2025

Introduction to R packages

September 29, 09:00 am

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 usethis and devtools.
  • Create documentation with roxygen2.
  • Write and run unit tests with testthat to 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.

Register for this tutorial

Nicholas Tierney

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.

Workshop Organised by the Monash Business Analytics Team