Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SQL equivalents in R
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
You can’t perform that action at this time.