Topics Covered

dplyr Verbs & Pipes

Master filter, select, mutate, rename, summarise, and arrange — chain them with the pipe operators %>% and |>.

Grouping & Counting

Aggregate data with group_by() + summarise(), and quickly tally categories with count() and tally().

Reshaping Data

Transform between wide and long formats using pivot_longer() and pivot_wider().

Missing Data

Detect, visualise, and handle NAs using naniar (gg_miss_var, gg_miss_upset) and visdat (vis_miss).

Key Concepts

Scripts

📄 missing_data_viz.R

Missing data analysis with naniar & visdat — vis_miss() heatmap, gg_miss_var() bar chart, and gg_miss_upset() co-occurrence plot.

Download →

📄 dplyr_verbs.R

Core dplyr verbs on Palmer Penguins — filter, select, rename, mutate, group_by + summarise, count/tally, and pivot_longer/pivot_wider.

Download →

📄 data_wrangling_exercises.R

Hands-on exercises with chaining, OR logic, %in%, helper selectors, and multi-column mutate — includes 🧪 Try-It challenges.

Download →

Visual

Missing data visualization

Missing data visualisation generated by missing_data_viz.R

Homework

Resources

Homework Downloads

📄 data_manip_intro_tidyverse.R

Introduction to tidy data manipulation — pipes, filter, select, mutate, and core dplyr workflows.

Download →

📄 data_manip_efficient_tidyverse.R

Efficient tidyverse patterns — across(), where(), rowwise operations, and performance-conscious wrangling.

Download →

📄 data_manip_advanced_tidyverse.R

Advanced tidyverse techniques — joins, nested data, purrr mappings, and complex reshaping pipelines.

Download →