Welcome to Data Manipulation with dplyr

Data manipulation is a crucial part of data visualization and analysis. This workshop introduces common functions in the dplyr package to manipulate rows and columns.
See the UBC library Research Commons event calendar for related workshops on various topics.

In this workshop we will use data from Statistics Canada’s 2023 Survey on Giving, Volunteering and Participating to answer the question: Who are Canada’s most dedicated volunteers?

Before the workshop

This workshop assumes a basic understanding of the R language, but all learners are welcome to participate.

To get ready:

  1. Install the latest versions of R and RStudio:
  2. Download these two files and save them in the same folder:
  3. Open the R script in RStudio and go to Session > Set Working Directory > To Source File Location.

Note: Data is adapted from Statistics Canada, Survey on Giving, Volunteering and Participating Public Use Microdata File, 2023. This does not constitute an endorsement by Statistics Canada of this product.

Learning objectives

At the end of this workshop, you will be able to:

  1. Understand what the dplyr package is used for
  2. Use the pipe operator to combine multiple manipulations together
  3. Manipulate rows to filter, select, arrange, and combine cases
  4. Manipulate columns to select, arrange, add, and rename variables
  5. Combine these steps to answer a research question

Schedule

0:00 - 0:05 Welcome and using Zoom
0:05 - 0:15 Intro to dplyr and set up
0:15 - 0:35 Manipulating rows
0:35 - 0:50 Manipulating columns
0:50 - 1:00 Putting it all together and recap
1:00 - 1:30 Optional Q&A and bonus content

Resources


View in GitHub

Loading last updated date...