Setting up your PhD (or other research project) as an R package

How I set up my PhD as an R package


Ella Kaye


August 23, 2018

slides materials


In this talk, I will try to convince you that if you have any of your own data or write any of your own R functions, then you should put them into an R package. Benefits include reproducibility and keeping everything together and accessible. Also, it’s really easy to do, and to prove it, I will build a package from scratch before your very eyes. I will also introduce the bookdown package for writing reports and even your thesis. Filled with tips and tricks from my own experiences, this talk could save you hours!

Event details

Event: Birmingham R User Group

Date: August 8th, 2018

Time: 18:00-20:00 GMT+1

Location: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, B7 4BB

Key points

  • Put your data and functions in an R package

  • R packages are good for reproducibility, for keeping everything together and for sharing

  • Existing R packages such as {usethis}, {devtools} {roxygen2} and {testthat} take the friction out of writing your own packages


Keyboard shortcuts for slideshow (once you’ve clicked inside it):

  • Use and to navigate through the slides.

  • Use o for an overview of all slides.

  • Use h to see a list of other shortcuts

    • f to toggle full screen not working, but the rest are fine.

    • For full screen slides, go to slides then press f.



BibTeX citation:
  author = {Ella Kaye},
  title = {Setting up Your {PhD} (or Other Research Project) as an {R}
  date = {2018-08-23},
  url = {},
  langid = {en}
For attribution, please cite this work as:
Ella Kaye. 2018. “Setting up Your PhD (or Other Research Project) as an R Package.” August 23, 2018.