Chapter 17: Dates and times

Set up

We have already loaded the R packages you need for this tutorial. Once you start working in RStudio, you will run code like the code shown below to load the R packages you need.

Exercises

All exercises are from R for Data Science 2nd Edition.

Ex 3 in Section 17.2.5

For each of the following date-times, show how you’d parse it using a readr column specification and a lubridate function (refer to section 17.2.2).

Ex 3 in Section 17.3.4

Compare air_time with the duration between the departure and arrival. Explain your findings. (Hint: consider the location of the airport.)

Open code chunk

Here is a code chunk in case you wish to play around with some code