1. Learn
  2. /
  3. Courses
  4. /
  5. Data Science Visualization - Module 2

Exercise

Exercise 7. group_by example 3

We can actually combine both of these summaries into a single line of code. This is because group_by permits us to group by more than one variable.

We can use group_by(AgeDecade, Gender) to group by both age decades and gender.

Instructions

100 XP
  • Create a single summary table for the average and standard deviation of systolic blood pressure using group_by(AgeDecade, Gender).
    • Note that we no longer have to filter!
    • Your code within summarize should remain the same as in the previous exercises.
  • Note: ignore warnings about implicit NAs. This warning will not prevent your code from running or being graded correctly.