Session Ready
Exercise

summarize_at()

As mentioned in the video, there are two tidyverse functions that you will use frequently throughout the course; summarize_at() and count().

In this exercise, you'll be using summarize_at() to find summary statistics of three variables in the Male Fertility data set:

  • Surgical_Intervention: Did the participant have a surgical intervention? (1: Yes, 0: No)
  • Diagnosis: Was the diagnosis abnormal? (1: Yes, 0: No)
  • Age: Age of the participant at the time of analysis (all participants were between 18–36, and age normalized between 0–1).
Instructions 1/2
undefined XP
  • 1
  • 2

dplyr and fertility are loaded in your workspace.

  • Find how many participants had a surgical intervention (Surgical_Intervention = 1) and how many participants had an abnormal diagnosis (Diagnosis = 1).