Writing sharable (R) code. Oh… and sharing it!


Details
Join this session where we will build an R package, write unit tests for it, push it in a GitHub repository and integrate Travis CI with it!
If time permits, we can discuss briefly at the end how to build a drat repository — aimed to host multiple R packages — using GitHub as a Web Server, and how to use Travis CI to automatically push updates of your packages into the drat repo.
If you have never created an R package before, you may feel like this is too much information in a just short while. But don’t let this overwhelm you! The aim of this session is to introduce you to the relevant concepts, as we will touch upon the most important of them rather than diving into details. Even if you don’t fully understand what you are doing during the session, you will hopefully leave with a different perspective on how you can organise your code (for yourself or others) and gear up with the needed resources for the next time you want to reproduce these steps more seriously.
Prerequisites:
- Bring your own laptop!
- (Optional) Rstudio installed; this is not necessary to produce R packages but it does make your life easier as the main package for R package development, devtools, is well integrated with RStudio.
- The following R packages:
- devtools, usethis and roxygen2
- tidyverse, rlang
- (optional) drat
- ... if I have forgotten something, we will install it on the spot.
- A GitHub account. I could list this also as optional, but if you want the full experience from this second half of the session, it’s good to reproduce the steps yourself. You are of course welcome either way.
- A travis account (go to travis-ci.com and sign up with GitHub; this prerequisite assumes you already have a GitHub account)
Program:
18.00 Welcome
18.10 Maria Kalimeri, "Writing sharable R code."
19.30 Questions and mingle
20.00 Closing the event

Writing sharable (R) code. Oh… and sharing it!