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:
- Install the latest versions of R and RStudio:
- Download these two files and save them in the same folder:
- 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:
- Understand what the dplyr package is used for
- Use the pipe operator to combine multiple manipulations together
- Manipulate rows to filter, select, arrange, and combine cases
- Manipulate columns to select, arrange, add, and rename variables
- 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
Loading last updated date...