Created
December 18, 2015 12:44
-
-
Save anirudhjayaraman/48a6e6af93e1be166c0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Summarizing Exercise | |
# Select the flights that had JFK as their destination: c1 | |
c1 <- filter(hflights, Dest == 'JFK') | |
# Combine the Year, Month and DayofMonth variables to create a Date column: c2 | |
c2 <- mutate(c1, Date = paste(Year, Month, DayofMonth, sep = "-")) | |
# Print out a selection of columns of c2 | |
select(c2, Date, DepTime, ArrTime, TailNum) | |
# How many weekend flights flew a distance of more than 1000 miles | |
# but had a total taxiing time below 15 minutes? | |
nrow(filter(hflights, DayOfWeek %in% c(6,7), Distance > 1000, TaxiIn + TaxiOut < 15)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment