Created
December 17, 2015 13:30
-
-
Save anirudhjayaraman/6b366ac7b406eb9dff68 to your computer and use it in GitHub Desktop.
Comparisons between base R and dplyr`
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
# Some comparisons to basic R | |
# both hflights and dplyr are available | |
ex1r <- hflights[c("TaxiIn","TaxiOut","Distance")] | |
ex1d <- select(hflights, TaxiIn, TaxiOut, Distance) | |
ex2r <- hflights[c("Year","Month","DayOfWeek","DepTime","ArrTime")] | |
ex2d <- select(hflights, Year:ArrTime, -DayofMonth) | |
ex3r <- hflights[c("TailNum","TaxiIn","TaxiOut")] | |
ex3d <- select(hflights, TailNum, contains("Taxi")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment