diff --git a/datetimes.Rmd b/datetimes.Rmd index a1a3e0b..42c9600 100644 --- a/datetimes.Rmd +++ b/datetimes.Rmd @@ -310,7 +310,7 @@ Setting larger components of a date to a constant is a powerful technique that a 1. Compare `dep_time`, `sched_dep_time` and `dep_delay`. Are they consistent? Explain your findings. -1. Compare `airtime` with the duration between the departure and arrival. +1. Compare `air_time` with the duration between the departure and arrival. Explain your findings. (Hint: consider the location of the airport.) 1. How does the average delay time change over the course of a day? diff --git a/transform.Rmd b/transform.Rmd index 7d98099..06dd2d3 100644 --- a/transform.Rmd +++ b/transform.Rmd @@ -356,7 +356,7 @@ There are many functions for creating new variables that you can use with `mutat * Arithmetic operators: `+`, `-`, `*`, `/`, `^`. These are all vectorised, using the so called "recycling rules". If one parameter is shorter than the other, it will be automatically extended to be the same length. This - is most useful when one of the arguments is a single number: `airtime / 60`, + is most useful when one of the arguments is a single number: `air_time / 60`, `hours * 60 + minute`, etc. Arithmetic operators are also useful in conjunction with the aggregate @@ -453,7 +453,7 @@ ggplot(flights, aes(air_time - airtime2)) + geom_histogram() Convert them to a more convenient representation of number of minutes since midnight. -1. Compare `airtime` with `arr_time - dep_time`. What do you expect to see? +1. Compare `air_time` with `arr_time - dep_time`. What do you expect to see? What do you see? What do you need to do to fix it? 1. Compare `dep_time`, `sched_dep_time`, and `dep_delay`. How would you