To get a copy of all the material, clone this repository to a directory of your choice.
If you are not familiar how to clone a repository, have a look here or download and unpack this zip folder.
To run any of the materials locally on your own machine, you will need the following:
- A recent version of R (download from here)
- A recent version of RStudio, (download from here)
- The following R packages:
You can install all required R packages at once by running the following code in the R command line:
# Package names
packages <- c("tidyverse", "cowplot", "ggforce", "ggrepel", "ggtext", "magick", "patchwork", "ragg", "rnaturalearth", "sf")
install.packages(packages)
To run the code, open up Rstudio. Copy–paste the code in the console pane and hit enter. Several messages should pop up. Scan these messages that are returned for errors and troubleshoot them if necessary. Warnings and other informational messages can be ignored.
Double-click on the hands-on-ggplot2.Rproj
file. Rstudio opens up with the working directory set to the same folder (where the Rproj file is placed). Now, you can open any script from the files pane—we start with 01-grammar.Rmd
.