SCV proudly presents Packaging and Sharing Your Code presented by Michael Lydeamore.
Sharing your R code doesn’t have to be a messy email chain or a zip file with cryptic scripts. In this hands-on workshop, you’ll learn how to wrap your code into a professional R package that’s easy to use, easy to share, and easy to maintain. We’ll guide you through the whole process—from setting up the structure to documenting your functions and publishing your work online, including websites for your documentation and submission to CRAN.
Bio:
Michael Lydeamore is a senior lecturer in the Department of Econometrics and Business Statistics. His research focuses on computational statistics, and network theory, applied to public health and infectious diseases problems. Dr Lydeamore is a Fellow of the Higher Education Academy, and editor for Royal Society Open Science and the Bulletin of Mathematical Biology. He is also currently a board member and treasurer for the
Australia and New Zealand Industrial and Applied Mathematics society.
Prerequisites:
You will need a basic understanding of R to the level explained in R4DS. Some knowledge of Quarto or RMarkdown will be useful.
Knowledge of git, and an ability to use GitHub is advised. To follow all the exercises, needs you to have a GitHub account ready for this tutorial.
Structure of the tutorial:
Session 1: Creating a package for your code
This session will guide you through creating your first package for your code. This will include:
- R Package structure and key files
- How to include your R functions
- Inclusion and processing of data
- Setting up your package for version control
- Documenting your code to view inside R
- Writing examples and vignettes
Session 2: Sharing your code on the web
This session will show you how you can share your code to others on the internet. This will include:
- Syncing your code with git and GitHub
- Hosting your documentation online using roxygen2 and pkgdown
- Checklists for submission of your package to CRAN, including testing on various platforms using rhub.
- Preventing common reasons for package rejection by CRAN moderators
Getting started:
- Set up a GitHub account if you don’t already have one, and make sure your SSH keys are set up. It’s not essential for this workshop but eventually your package should be made available in a GitHub repo, so this is a good time to start.
- Install the required packages for the workshop:install.packages(c("pkgdown","usethis","devtools"))
To Register
Cancellation Policy:
Cancellations received prior to two weeks before the event will be refunded, minus the Stripe processing fee (1.75% + $0.30 per transaction) and an SSA administration fee of $20.
From then on, no part of the registration fee will be refunded. However, registrations are transferable within the same organisation. Please advise any changes to events@statsoc.org.au.