- This event has passed.
Intermediate R: Cleaning and Reshaping Data (Part 2/2)
March 7 @ 10:00 am - 12:00 pm
This workshop is offered in person in DataLab’s classroom in Shields Library. A Zoom broadcast option is also available. Advance registration required: https://reservations.library.ucdavis.edu/event/11931815
Description
This 2-part workshop series for intermediate R programmers focuses on how to load and prepare data for analysis. We’ll explore how to screen a data set for potential problems with its structure and data types, as well as how to correct these issues. For example, it is increasingly popular to to use datasets loaded from text files or scraped from the web, but these data often have formatting features that need additional processing before they can be used. Thus, we’ll take a deep dive into R’s “stringr” package for text processing. Dates and times are another kind of data that can be difficult to work with, and we’ll cover the basics of using the “lubridate” package for processing temporal data. You’ll also learn how to reshape data with structural problems and how to combine linked data sets.
This workshop is NOT an introduction to R and is intended for motivated intermediate to advanced learners from all domains at UC Davis who want to hone their R skills. Please make sure you meet the prerequisites before registering as we will be unable to answer introductory R questions during this session. (Want to brush up on R? Check out our R Basics 4-part introductory series.)
Objectives
After this workshop learners should be able to:
– Inspect data files to determine how best to load them into R;
– Identify and convert features to appropriate data types;
– Use the “stringr” package clean and extract data from text;
– Use regular expressions to describe patterns in text;
– Use the “lubridate” package to parse dates and times;
– Identify features of a “tidy” dataset; Describe the advantages and disadvantages of tidy data;
– Use the “tidyr” package to reshape data;
– Describe what a join is;
– Compare differences between an inner join and left join;
– Use the “dplyr” package to join two data sets on a common column;
Prerequisites
Participants must have taken DataLab’s “R Basics” workshop series and/or have prior experience using R, be comfortable with basic R syntax, and have the latest versions of R and RStudio pre-installed and running on their laptops.
Instructors
Nick Ulle is a statistician and computer scientist. Prior to DataLab he was a visiting assistant professor of Statistics at UC Berkeley, where he designed and taught courses in data science. During his PhD in Statistics at UC Davis, he developed source code analysis techniques for the R programming language. His research interests include statistical computing, programming languages, data visualization, and pedagogy.
Wesley Brooks holds a Statistics Ph.D. from the University of Wisconsin. He works at the DataLab as a Data Scientist.