Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Using R for Data Wrangling, Analysis, and Visualization: Home

Workshop guide for Using R for Data Wrangling, Analysis, and Visualization

Workshop Agenda

Thursday, September 9th, 2:00 - 4:00 PM


  1. R and RStudio Installation
  2. More about RStudio - interface, projects, working directory
  3. R package installation
  4. Objects, functions, and comments
  5. Vectors and data types
  6. Missing data
Installation for PC
  1. Download R from
  2. Download RStudio at
Installation for Mac
  1. Check your version number and make sure to download the correct version of R/RStudio.

  2. Download R from, and select the .pkg link based on your macOS version.

  3. Download RStudio at

R & RStudio Installation Guidance

Course Materials

Thursday, September 16th, 2:00 - 4:00 PM

  1. Data frames and tibbles
  2. Factors
  3. Dates
  4. Data wrangling with dplyr


About the Dataset

The data used for this lesson are in the figshare repository at:

This lesson uses SAFI_clean.csv. The direct download link for this file is:

Course Materials
Extra Materials

Thursday, September 23rd, 2:00 - 4:00 PM

  1. Reformat data with tidyr
  2. Export data
  3. About ggplot
  4. Building your plots iteratively
  5. Boxplots
  6. Bar charts
  7. Faceting
## Not run, but can be used to load in data from previous lesson!
interviews_plotting <- interviews %>%
  ## pivot wider by items_owned
  separate_rows(items_owned, sep = ";") %>%
  ## if there were no items listed, changing NA to no_listed_items
  replace_na(list(items_owned = "no_listed_items")) %>%
  mutate(items_owned_logical = TRUE) %>%
  pivot_wider(names_from = items_owned, 
              values_from = items_owned_logical, 
              values_fill = list(items_owned_logical = FALSE)) %>%
  ## pivot wider by months_lack_food
  separate_rows(months_lack_food, sep = ";") %>%
  mutate(months_lack_food_logical = TRUE) %>%
  pivot_wider(names_from = months_lack_food, 
              values_from = months_lack_food_logical, 
              values_fill = list(months_lack_food_logical = FALSE)) %>%
  ## add some summary columns
  mutate(number_months_lack_food = rowSums(select(., Jan:May))) %>%
  mutate(number_items = rowSums(select(., bicycle:car)))


Course Materials
Extra Materials

Pre-survey & Workshop Evaluation

Please fill the pre-survey and evaluation to help us understand your expectations and thoughts about the workshops. 

Popular Style Guides for R

Contact Information

Profile Photo
Jingjing Wu
Room 8 (Basement)
TTU Library

Contact Information

Profile Photo
Cynthia Henry
Texas Tech University Library
Room M116
(located on the Mezzanine/Balcony level)
Skype Contact:
Social: Twitter Page