R Markdown

Version Control with git(hub) - 1/2 day

Reading

  1. install this (3min) and set up your account
  2. why git? (don’t worry about understanding the technical/code bits!) (20mins)
  3. what is a VCS? (10min)
  4. most basic git commands (5min)
  5. interactive intro to git (15min)
  6. Using Git(hub) with RStudio and packages

Exercise

  1. Set up a github account, install Git and Git(hub) and link it with RStudio on your computer
  2. Set up a public repository with a dummy file. Make at least 3 commits and 1 merge using at least 2 different branches.
  3. Send link to data unit

Software design (1 1/2 days)

Reading

  1. Basics of functional programming
    1. writing custom functions
    2. pure functions
    3. cohesion and coupling
    4. important for tidyverse / dplyr users: tidyeval & creating functions around NSE d.co.nz/Com
  2. Test Driven Development
    1. why Test driven development
    2. test driven development in R with testthat

Exercise

  1. Write unit tests for a single (not yet existing) function (e.g. SMEB calculation)
  2. Write a pure function that passes the tests
  3. Push to github and send link to Data Unit for code review & Q&A during the global workshop