3.1 Read in data & load libraries

Load the libraries of the necessary packages prior to reading in the bab9 data file in the manner described in Practical 8. This can be done with the code below:

#--- Load libraries - always load the tidyverse last to avoid conflicts - make sure you have installed packages with install.packages()

#--- Change output options: R will not show scientific notation and will round every number to three digits (the default is 7).
options(scipen = 10, digits=3) 

#--- Change theme: This ensures our plots come out with a white background

#--- Read in the bab9 data file
bab9 <- read.dta("./BAB9.dta", convert.factors = T)