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

Exercise

Exercise 16. A second example

We are now going to make a histogram of the heights so we will load the heights dataset. The following code has been pre-run for you to load the heights dataset:

library(dplyr)
library(ggplot2)
library(dslabs)
data(heights)

Instructions

100 XP
  • Create a ggplot object called p using the pipe to assign the heights data to a ggplot object.
  • Assign height to the x values through the aes function.