Menu
Log in


CPD152 - DIY R Package Workshop

  • 12 Oct 2022
  • 10:00 AM - 4:00 PM
  • Online
  • 27

Registration

  • Student membership with SSA is available for full-time students for $20 annually.
  • Student membership with SSA is available for full-time students for $20 annually.
  • SSA Membership is available from $240 annually.
  • Student membership with SSA is available for full-time students for $20 annually.
  • SSA Membership is available from $240 annually.
  • Student membership with SSA is available for full-time students for $20 annually.

Registration is closed

The NSW branch is offering DIY R Package workshop.

Do you have a few custom functions on heavy rotation? Perhaps you have a piece of code that you regularly share with colleagues? Maybe you’ve developed a new statistical model and want to share it with the world? Why not put it all in an R package?! This interactive workshop will equip you with the basic skills to create an R package of your own! We will walk through the package building process and apply the same workflow to your own function. We will learn about testing and continuous integration and implement them using Github Actions.

Participants will need to bring along one function they would like to put in a package.

 Prior to the workshop participants will need to have

  1. a Github account;
  2. the most recent version of R and RStudio installed;
  3. the following package(s) and their dependencies installed: devtools, testthat, knitr. 

Any questions about the workshop, feel free to reach out to Dr Fonti Kar!

About the Presenter:

Fonti is a postdoctoral research fellow at University of New South Wales, Sydney, Australia. She is an evolutionary biologist wearing R developer shoes. Fonti works alongside researchers to develop R software tools for the research community. Her interests include biostatistics, reproducible science, learning about the latest coding practices and teaching others to enjoy using R.

 Course Outline

  • Why make an R package? A brief group discussion
  • The toolkit
  • Practical: Code along and make “ohwhaley”
    • R package skeleton
    • Add a function
    • Document it
    • READMEs Long form documentation
    • A basic test
  • Practical: BYO function and make your own package
  • Continuous integration and its benefits for an R package
  • Practical: Setting up Github Actions for your own package
  • Where to get help?
  • BONUS (Time and pace permitting: Setting up a landing website for your own package)

Course Timetable

Below is the tentative schedule for the workshop,. It will be adapted on the workshop day. 

10:00 – 11:00 (1 hour)

Session 1

11:00 – 11:30 (30 mins)

Break

11:30 – 12:30 (1 hour)

Session 2

12:30– 13:30 (1 hour)

Long Break

13:30 – 14:30 (1 hour)

Session 3

14:30 – 15:00 (30 mins)

Break

15:00 – 16:00 (1 hour)

Session 4


Learning Objectives

  • Create a skeleton for an R package in making in RStudio IDECreate and document a function
  • Understand the differences between a landing page, short- and long- form documentation
  • Document functions using roxygen2 package
  • Create a vignetteWrite tests for a function using testthat package
  • Integrating functions from devtools and usethis packages to create a simple package
  • Understand the benefits of continuous integration
  • Implement continuous integration with Github Actions

 Link where prerequisite software can be downloaded from:

 R:
https://cran.csiro.au/

 RStudio:

https://www.rstudio.com/products/rstudio/download/#download

To install the above R packages: Go to R console and type:
install.packages(c(“devtools, testhat”))

Github Account:
https://github.com/ and click Sign Up on the top right corner for a Personal account

Powered by Wild Apricot Membership Software