1 Setup

1.1 Loading Libraries

The following R libraries are used in this report–please install them to be able to replicate the sections that follow. The tidyverse library is a metapackage–a package containing other packages–consisting of useful data management and visualization tools (https://www.tidyverse.org/). The library magrittr is used for its pipe operations, which facilitate readable code by being able to “pass” functions to other functions (https://magrittr.tidyverse.org). Finally, the packages knitr and kableExtra are used to present formatted tables (https://github.com/yihui/knitr) (https://github.com/haozhu233/kableExtra).

1.1.1 R Code: Libaries Loading Loop

# Libraries to use.
libs <- c('tidyverse', 'magrittr', 'knitr', 'kableExtra')

# For each library...
for (i in libs) { 
  
  # If it's not already installed...
  if (!require(i, character.only = TRUE)) { 
    
    # Install it...
    install.packages(i) 
    
    # Then load it.
    library(i, character.only = TRUE)  
    
  }
  
}