From the course: Learning the R Tidyverse
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create group summaries - R Tutorial
From the course: Learning the R Tidyverse
Create group summaries
- [Instructor] dplyr is a member of the tidyverse and provides a number of different verbs for manipulating, dissecting, and otherwise wrangling data. One really important aspect of data wrangling is getting a feeling of the data through summaries. And dplyr has a very powerful function or verb called summarise(), which generates summaries of data quickly and efficiently. Let's look at how we go about doing that inside of RStudio. So, in our project, we have two folders, data and data-raw but I'm not going to do anything with those, I'm going to go directly to the data-processing.R file. So, let's open it up and see what we have. Before I do, I want a closed Environment because I don't need to see it in this exercise. So, I'll maximize the size of my script file. And I'll also get rid of my File Explorer, so I just have my Console and my script file, here on the left. So, at the top of the script file, I do what I do whenever I'm using the tidyverse. I load it using library, this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Sample data and cross-validation with dplyr4m 8s
-
(Locked)
Categorizing data with group_by7m 7s
-
(Locked)
Count members of subgroups within groups with n()3m 51s
-
(Locked)
Cumulative sums and more: cumsum, cumall, and cumany11m 52s
-
(Locked)
Create group summaries7m 26s
-
(Locked)
Remember to ungroup before moving on7m 44s
-
(Locked)
-
-
-