# Load necessary packages
library(ggplot2)
library(dplyr)
library(nycflights13)
# Load flights data set in nycflights
data(flights)
What do positive values of the gain
variable in flights_plus
correspond to? What about negative values? And what about a zero value?
flights_plus <- flights %>%
mutate(gain = arr_delay - dep_delay)
ggplot(data=flights_plus, aes(x=gain)) +
geom_histogram()