In large datasets, we often gain good insights by examining how different segments behave. The similarities and differences can reveal interesting patterns. This recipe shows how to create graphs that enable such comparisons.
If you have not already done so, download the book's files for this chapter and save the
daily-bike-rentals.csv file in your R working directory. Read the data into R using the following command:
> bike <- read.csv("daily-bike-rentals.csv") > bike$season <- factor(bike$season, levels = c(1,2,3,4), labels = c("Spring", "Summer", "Fall", "Winter")) > attach(bike)
We base this recipe on the task of generating histograms to facilitate the comparison of bike ...