22 More DPLYR Excercies
Using the nycflights13 dataset and the dplyr package, answer these questions. Some answers are given in square brackets for you to check your answers.
- How many flights in Sept were late departing flights? [7815]
- How many flights in Sept were late departing flights that originated at JFK airport? [2649]
- How many flights in Sept were late departing flights with an origin of JFK airport and had an destination of anywhere except MIA? [2572]
- Which carrier had the most flights in this data set? [UA with 58665]
- Which destination had the most flights in this data set? [ORD with 17283]
- Which destination had the most flights with departure delays of greater than 60 minutes in this data set? [ORD with 1480]
- What was the longest arrival delay in this dataset? [1272]
- Which carrier in September had the most late departing flights? [UA with 1559]
- Create a variable called total.annoyance which arrival delay plus the departure delay for each flight.
- Which carrier with more than 10 flights in September had greatest % late departing flights?