PS03: Data Wrangling

Published

May 11, 2026

Overview

Practice the core dplyr verbs — select(), filter(), mutate(), summarize(), arrange(), and group_by() — using the txhousing dataset, which contains monthly housing sales data for cities across Texas and comes with the ggplot2 package.

Read Chapter 3 of ModernDive before attempting this problem set.


Download

Download the problem set template, open it in RStudio, and complete the exercises directly in the document.

PS03.zip


Setup

Run this at the top of your document to install and load the required packages:

if (!require(pacman)) install.packages("pacman")
pacman::p_load(ggplot2, dplyr)

Exercises

Data wrangling review

Worked examples of each dplyr verb using Austin and Abilene housing data.

Independent practice

Apply the verbs independently to answer questions about Texas housing trends.


When you are done, render to HTML and submit on Moodle. Name your file PS03_yourname.html.