September 2018
Beginner
206 pages
4h 27m
English
In this section, we will create a histogram with ggplot2 and experiment with different binwidths to find the best representation of the data. Follow the steps below:
install.packages("ggplot2")library(ggplot2)
ggplot(msleep, aes(sleep_total)) + geom_histogram()
ggplot(msleep, aes(sleep_total)) + geom_histogram(binwidth = 10)
ggplot(msleep, ...