Back to Course

0% Complete
0/33 Steps
In Progress
Lesson 14 of 33
In Progress

# group_by

Complete the group_by sections of the data-wrangling-and-analysis-exercises.Rmd file.

Solutions

Video

Code

General Data Wrangling and Analysis Resources

Because most material that discusses data wrangling and analysis with the dplyr packges does so in a way that covers all of the verbs discussed in this course, I have chosen not to separate them by lesson. Instead, here are some helpful resources for learning more about all of the tidyverse verbs discussed in this course:

Chapter 5 of R for Data Science

RStudio Cloud primer on working with data

Tidyverse for Beginners by Danielle Navarro

Learning Statistics with R by Danielle Navarro

Introduction to the Tidyverse by Alison Hill

A gRadual intRoduction to data wRangling by Chester Ismay and Ted Laderas

Working in the Tidyverse by Desi Quintans and Jeff Powell

Christine Monnier video tutorials on dplyr

#### Questions about the lesson? Put them below.

1. Hello, I have a question. how could I get the subtotals by group on the same DF that we obtain when we use de group by + summarise?

We get something like this, but i would like to see on the same table the sub totals (by gender) and the grand total (which should by 10.000)

female Looking 6.940299 135
female NotWorking 7.094077 1732
female Working 6.909353 2086
female NA NaN 1067
male Looking 7.147727 176
male NotWorking 7.101619 1115
male Working 6.736634 2527
male NA 6.000000 1162

2. I made a short video to show how you could do this. You can also find the code that I used here. Hope that helps! If you have other questions, let me know.