# only need to do once
# install.packages("librarian")
packReq <- c(
"tidyverse", "naniar", "summarytools", "leaflet", "datacleanr", "supportR"
)
librarian::shelf(packReq)Setup
This tutorial relies on a number of published packages. You can install anything you are missing using the code snippet below.
We will be working with some example data. To follow along exactly with the paths in this tutorial, you will need to create a folder called ‘example_data’ and download the following files into that location. The example_data should be within your working directory for Rstudio (if you want to copy and paste code snippets without changing paths). Note you may need to copy the links below into a new browser window to download them, depending on your operating system
Last, we will be using the summarytools package. This should work out-of-box for windows users. Mac users may need to install XQuartz if you haven’t already. Linux - I haven’t tried…Linux users a thanks in advance for being the guinea pigs and please provide feedback any OS incompatibilities. As with all things R, fighting to get the right things installed is always half the battle…sorry about that! More troubleshooting of installing the summarytools package may be found here; more info on getting R to play nicely with Xquartz in general can be found here.
For today’s workshop, I would suggest spending no more than 10 minutes trying to get things installed; if you can’t make summarytools work, just work through the rest of the tutorial and/or partner up with a friend whose computer is better behaved and circle back to the install issues afterwards.