Skip to Main Content

Introduction to R: A Hands-on Workshop (Part 2)

Event box

Introduction to R: A Hands-on Workshop (Part 2) In-Person

Registration needed. In Person event

Overview:

Have data you'd like to analyze but don't know where to start with R? This beginner-friendly, two-part workshop takes you from opening R for the first time to producing a clean dataset, summary tables and publication-ready plots.

We'll work with a realistic (fictional) measles outbreak dataset that has the kinds of problems real data has: messy column names, impossible values, inconsistent categories and dates stored as text. You'll code along with the instructor and practice each skill right away in short exercises, with helpers in the room to get you unstuck. Clinical, public health and laboratory researchers are all welcome.

Part 1 (Nov 20): From raw file to clean data

By the end of Part 1, you will be able to:

  • Set up an R project in Positron so your code and data stay organized and easy to find
  • Use R's building blocks: objects, vectors, functions and missing values (NA), and find help when you're stuck
  • Import data from CSV and Excel files
  • Inspect a dataset to spot problems such as wrong data types, impossible values, typos and missing data
  • Clean data with the tidyverse: tidy column names, fix dates, recode categories and create new variables like age groups
  • Save your clean dataset so you can pick up where you left off

Part 2 (Dec 4): From clean data to results

By the end of Part 2, you will be able to:

  • Handle missing values and duplicate records
  • Combine datasets with joins, for example adding population sizes to calculate case rates
  • Summarize data with counts, percentages and group-wise statistics
  • Visualize data with ggplot2: build histograms, box plots and bar charts, label them clearly, and save them
  • Create a "Table 1" of participant characteristics with gtsummary and export it to Word
  • Leave with a complete, reusable R script you can adapt to your own data

Who should attend

Beginners with no prior programming experience. If you've used Excel, you're ready. We recommend attending both parts. If you already know basic R (importing data, mutate(), the pipe), you're welcome to join Part 2 only; a ready-made clean dataset will be provided.

Before the workshop

Please bring a laptop and install R, Positron and the workshop packages before Part 1, using the setup instructions. Setup takes about 30 minutes and ends with a short test, so you'll know you're ready. Bring the same laptop and workshop folder to Part 2. If you get stuck, contact maximilian.wegener@yale.edu or sofia.fertuzinhos@yale.edu before the workshop.

Date:
Friday, December 4, 2026
Time:
10:00am - 12:00pm
Time Zone:
Eastern Time - US & Canada (change)
Location:
SHM L 111, Cushing/Whitney Medical Library, 333 Cedar Street
Categories:
  Bioinformatics     Coding & Computing  

Registration is required. There are 20 seats available.

Event Organizer

Profile photo of Max Wegener
Max Wegener
Profile photo of Sofia Fertuzinhos
Sofia Fertuzinhos