Created
April 8, 2017 10:26
-
-
Save standarderror/e439c6d34d7f09f5036aa7bdff9a798c to your computer and use it in GitHub Desktop.
SQL equivalents in R
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
SELECT ... FROM a JOIN b WHERE ... GROUP BY ... HAVING ... ORDER BY ... | |
is equivalent to a chain of R commands involving | |
a %>% | |
select(...) %>% | |
filter(...) %>% | |
inner_join(b, ...) %>% | |
group_by(...) %>% | |
summarise(...) %>% | |
filter(...) %>% | |
arrange(...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment