
Tidying and Manipulating Data Using the Tidyverse in R
This one-day course will cover essential data wrangling skills in R using the tidyverse (dplyr, tidyr, stringr, etc). The focus will be on solidifying foundational best practices for programmatically shaping ‘messy’ data into tidy data fit for analysis.
Participants will learn how to read and tidy data from STATA, SPSS and Excel files in R using the haven, readxl and labelled packages; create transformations, recode, and aggregate variables using mutate and group_by functions; reshape data from long to wide formats; use basic regular expressions to tidy and manipulate character strings; join relational datasets; and conditionally select columns and filter rows, all using clear and readable tidyverse style code. These skills are distinct from statistical modelling, but are often overlooked. Yet, in real-world data analysis, they often constitute the majority of the work.
“I’ve been using R for a few years and still learnt lots” – Feedback from a previous participant
Everyone is welcome, but participants should have very basic familiarity with R to get the most out of the training. The ability to open R/RStudio, open scripts, and a basic knowledge of data types (character, numeric, etc.), objects, and functions, is sufficient. Attendees with no previous experience of R should complete the online training resource Introduction to Data Analysis using R for a solid grounding. While the course is pitched towards beginner R users, it also includes some intermediate and advanced material that experienced R users may find beneficial.
The session will include a series of short lectures followed by hands-on practical activities using real-world data. Attendees will need to bring a laptop with R and RStudio pre-installed on their system. They will also need to download or clone a copy of the Github repository containing the practical exercises and data that will be used throughout the training in advance. Instructions on how to do this will be given in advance of the training course.
Outcomes
By the end of this training course, you will have:
- A solid understanding of key principles in data structures;
- The ability to read in data from a number of different file types and to make it useable in R;
- Familiarity with a ‘toolbox’ of data tidying tools (mutates, selects, filters, joins, pivots, grouping) that help you prepare messy real-world data for analysis.
Contributors
Dr Calum Webb (SFHEA, RSS GradStat) is a Lecturer in Quantitative Social Science and Deputy Director of Advanced Data Analytics at the Sheffield Methods Institute, School of Education, University of Sheffield. He is a long-time R and tidyverse user, and teaches the Introduction to Quantitative Research and Data Visualisation models on the University of Sheffield’s MA in Social Research and BA in Social Sciences. His background is in Sociology and Social Policy, so he is very used to the challenge of having to learn to write code as part of doing a PhD!
Please note: The WRDTP is committed to sustainability and waste reduction. If you have booked a place but are no longer able to attend an event, please let us know at least 3 working days in advance by emailing training@wrdtp.ac.uk or cancelling your place on Eventbrite. Failure to do so may result in the cost of your place being deducted from your RTSG (if you are funded by the WRDTP), or a charge being made to your department (if you are not funded by the WRDTP). Thank you in advance for your cooperation.
This is an in-person event at the University of Sheffield.
This event is open to members of WRDTP partner institutions and other ESRC DTPs.
Bookings will close at 9:00am on Wednesday 18th November.
When booking your place, we ask that you use your institutional (.ac.uk) email address and complete all fields of the booking form. Thank you for your understanding.







