Dplyr and Multiple Data Frames

Lecture 6

Dr. Elijah Meyer

Duke University
STA 199 - Fall 2023

2022-09-14

Checklist

– Clone ae-05

– HW-2 Due Tuesday (19th) on Gradescope

– Lab-1 Due Friday (16th) on Gradescope

– Reminder: Commit and push AEs at end of class

– Keep up with Slack

– Are you still in the GitHub organization?

Announcements: Correct Project

Announcements: Merge Conflicts

Announcements: Merge Conflicts

Announcements: Merge Conflicts (in Groups)

Goals for today

– Continue practicing with dplyr functions

– Join datasets

Warm up

Identify which dplyr functions chooses rows or changes columns of an existing data set. Also, define what each function does.

select()

slice()

arrange()

Warm up

select() - column

slice()

arrange()

Warm up

select() - column

slice() - row

arrange()

Warm up

select() - column

slice() - row

arrange() - row

ae-05

Joining datasets

Data merging is the process of combining two or more data sets into a single data set. Most often, this process is necessary when you have raw data stored in multiple files, worksheets, or data tables, that you want to analyze together.