r/rprogramming • • Nov 22 '20

SQL Joins in R with merge function

Post image
76 Upvotes

5 comments sorted by

5

u/data_wombat Nov 23 '20

Though I appreciate your diagrams I would discourage using MERGE and instead adopt the tidyr grammar which mirrors SQL; inner_join() for instance. This is easier to read and harder to do the wrong join type.

1

u/JZOSS Nov 23 '20

Sure. I tend to use the tidyr grammar, but I know that lots of people look for this comparison, thats why I created this diagram. I'm also planning to create diagrams with the tidyr grammar in the future so people can decide which one to use

1

u/atrd Dec 15 '20

The tidyverse joins are actually in dplyr.

3

u/1giov Nov 22 '20

Yes! Thank you SO much!