delay <- flights|>#Creates a top 20 listarrange(desc(arr_delay)) |>#Desc makes descending order thus top 10mutate(column ="top") |>#add a column for them to be consider top 20head(150) #Use 20 variables
delay1 <-merge(delay,airlines)delay1 <- delay1 |>mutate(origin =recode(origin, EWR ="Newark Liberty International Airport", LGA ="Laguardia Airport" , JFK ="John F. Kennedy International Airport"))
American airlines is responsible for 17 of the 20 most delayed arrivals
undelay <- flights|>#Creates a top 20 listarrange((arr_delay)) |>#Desc makes descending order thus top 10mutate(column ="bottom") |>#add a column for them to be consider top 20head(50) #Use 20 variablesundelay