Event box

Working with Date and String Variables in R

This workshop provides a practical introduction working with date/time and string variables in R.

This workshop assumes experience and comfort with using R for data analytic work. If you are new to R, you should start with the "First Steps in R," "Second Steps in R," and "Manipulating Data in R using the Tidyverse" workshops.

Software Used: R, RStudio


This workshop covers:

  • Using the lubridate and stringr packages to work with dates and strings, respectively
  • Formatting dates and times 
  • Parsing dates
  • Calculating time spans
  • Converting time spans (e.g., hours to minutes)
  • Trimming whitespace from character strings
  • Searching and replacing within character strings
  • Regular expressions
  • Pattern matching and extracting text of interest

NEW: Any student who participates in at least 3 library workshops during the fall 2021 semester will be eligible for a prize! How it works: Register for a library workshop or tour. After you have attended at least 3, a librarian will contact you with information about how to pick up your prize. Learn more about this incentive program at: guides.library.yale.edu/WorkshopIncentiveProgram

A link will be sent out within 24 hours of the workshop.

Tuesday, November 30, 2021
1:00pm - 2:30pm
Time Zone:
Eastern Time - US & Canada (change)
Zoom (Online Only)
  Marx Science and Social Science Library     Miscellaneous     Statistics  

Registration is required. There are 37 seats available.

Event Organizer

Sara Gottlieb-Cohen