Press "Enter" to skip to content

Merging Datasets in R with the Tidyverse

Anisa Dhana shows off several tidyverse methods for combining data sets together:

semi_join
The semi_join function is different than the previous examples of joins. A semi join creates a new dataset in which there are all rows from the data1 where there is a corresponding matching value in data2. Still, instead of the final dataset merging both the first (data1) and second (data2) datasets, it only contains the variables from the first one (data1).

Most of this looks like standard SQL joins, but read through to the end for a bonus which doesn’t typically appear in relational database products.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.