Using dplyr's group_by for grouping data in R (CC163)

November 15, 2021 • PD Schloss • 1 min read

In this episode of Code Club, Pat uses dplyr’s group_by function for grouping data in R without using the summarize function. Instead he uses slice_max to return the row or rows for each group that has the most recent date. He’ll demonstrate how to use these functions with a massive data frame that we downloaded from Our World in Data that describes COVID-19 vaccination rates by country and day.

Code

You can browse the state of the repository at the