From a Tidy Table to an Honest Summary and Plot

A tidy data table has one observation per row, one variable per column, and one value per cell. Before summarizing, inspect variable types, units, grouping categories, duplicates, and missing values. A mean answers a different question from a median; a count answers a different question from a proportion.


With dplyr, group_by() declares groups and summarise() reduces each group to named statistics. State what happens to missing values: mean(x, na.rm=TRUE) excludes missing x values, whereas the default may return missing. The denominator for a proportion should be visible, especially if data are missing.


In ggplot2, ggplot(data, aes(x=..., y=...)) maps variables to aesthetics, then a geom chooses marks: points for paired observations, bars for counts or supplied summaries, and lines for ordered trajectories.


Labels need units and an informative title. A visually separated group difference is descriptive evidence; it does not establish a causal mechanism without a design that supports one.

After grouping observations by treatment, which dplyr verb is used to calculate one mean per treatment group?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A dataset has one row per plant with numeric height and numeric leaf area. Which ggplot2 geometry most directly displays their pairwise relationship?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A numeric vector contains 8, 10, and one missing value. What does mean(x, na.rm = TRUE) compute?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors