Professional Documents
Culture Documents
A Tutorial
by Ethan Lynagh
Introduction
Here is a guided overview of how this code works with set data.
Setup
First is to load the required packages {dplyr, ggplot2, cowplot}, make sure to install these if your environment
does not contain them (run install.packages(“dplyr”, “ggplot2”, “cowplot”)). We will also be sourcing some
custom built packages in this step, which you can look through yourself in the functions folder.
# Import Functions
source(paste0("functions/plotTopGroupNames.R"))
source(paste0("functions/plotTopNames.R"))
source(paste0("functions/createTopProfilePlot.R"))
# Import Packages
library(dplyr)
library(ggplot2)
library(cowplot)
We also need to ingest the pre-made data, you can investigate the data in the environment window and you
can adjust it as you’d like. Any data in the same format with participant numbers matching will work.
# Import Data
data <- readRDS("dataList.Rda")