In this session, we are going to go through the basics of writing reproducible code in R, using an RMarkdown document.
The material is self-paced and includes an example analysis. It is suggested that you work through the sections in order.
- Setting up an R project - Create a self contained project in RStudio
- Creating an RMarkdown notebook - Create a notebook to have all analyses and notes in one place
- Loading Data - Getting your own data into R
- Tidying Data - A quick example of transforming a messy dataset into something workable
- Manipulating and summarising data - How to take our tidy data and create some useful summaries
- Tidying model output - An example of how to tidy the output from a basic statistical model
- Plotting - To finish up, how to plot a summary of a model using ggplot2
- Additional resources - Steps to further learning
My version of the R Notebook we have been working on can be found here.