From the course: Learning the R Tidyverse

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Categorizing data with group_by

Categorizing data with group_by - R Tutorial

From the course: Learning the R Tidyverse

Start my 1-month free trial

Categorizing data with group_by

- [Instructor] Dplyer is a member of the tidyverse ecosystem and designed for manipulating data with a variety of different verbs. The group by verb allows data to be categorized into a hierarchy of groups. For instance, data could be grouped by continent, country, and then city. Dplyr operations like filtering, sampling, or calculating values using mutate can be done within these groups. It's important to note that groups are a special feature of the tidyverse's version of a data frame, the tibble. For most intents and purposes, we call tibbles data frames. But I thoroughly recommend you understand the relationship between tibbles and data frames if you're going to be a hardcore user of group by and dplyr. Let's look at some examples of using group by inside of our studio. So, inside of our project, we have a file called data dash processing, which is where we'll be working. So let's open that up. And at the top of the file, we load the tidyverse, so we'll run that code with command…

Contents