Skip to main content
Serdar Balci avatar

Serdar Balci has completed

Joining Data in R with dplyr

Start course For Free
4 hours
6,550 XP
Statement of Accomplishment Badge

Loved by learners at thousands of companies


Course Description

This course builds on what you learned in Data Manipulation in R with dplyr by showing you how to combine data sets with dplyr's two table verbs. In the real world, data comes split across many data sets, but dplyr's core functions are designed to work with single tables of data. In this course, you'll learn the best ways to combine data sets into single tables. You'll learn how to augment columns from one data set with columns from another with mutating joins, how to filter one data set against another with filtering joins, and how to sift through data sets with set operations. Along the way, you'll discover the best practices for building data sets and troubleshooting joins with dplyr. Afterwards, you’ll be well on your way to data manipulation mastery!
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Mutating joins

    Free

    Mutating joins add new variables to one dataset from another dataset, matching observations across rows in the process. This chapter will explain the various ways you can join datasets together and what happens when you do.

    Play Chapter Now
    Welcome to the course!
    50 xp
    The advantages of dplyr
    50 xp
    Keys
    50 xp
    Primary keys
    50 xp
    Secondary keys
    50 xp
    Multi-variable keys
    50 xp
    Joins
    50 xp
    A basic join
    100 xp
    A second join
    100 xp
    A right join
    100 xp
    Variations on joins
    50 xp
    Inner joins and full joins
    100 xp
    Pipes
    100 xp
    Practice with pipes and joins
    100 xp
    Choose your joins
    100 xp
  2. 2

    Filtering joins and set operations

    Filtering joins and set operations combine information from datasets without adding new variables. Filtering joins filter the observations of one dataset based on whether or not they occur in a second dataset. Set operations use combinations of observations from both datasets to create a new dataset.

    Play Chapter Now
  3. 3

    Assembling data

    This chapter will show you how to build datasets from basic elements: vectors, lists, and individual datasets that do not require a join. dplyr contains a set of functions for assembling data that work more intuitively than base R's functions. The chapter will also look at when dplyr does and does not use data type coercion.

    Play Chapter Now
  4. 4

    Advanced joining

    Now that you have the basics, let's dive deep into the mechanics of joins. This chapter will show you how to spot common join problems, how to join based on multiple or mismatched keys, how to join multiple tables, and how to recreate dplyr's joins with SQL and base R.

    Play Chapter Now
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more

Datasets

AerosmithThe EaglesElvis PresleyHank WilliamsJimi HendrixJulie AndrewsMichael JacksonFrank Sinatra and Bing CrosbyMusicalsThe Dark Side of the Moon (Pink Floyd)Top selling albums in the USThe Complete Studio RecordingsThe Song Remains the SameThe Definitive CollectionLahman NamesLive! BootlegSupergroups

Collaborators

Collaborator's avatar
Nick Carchedi
Collaborator's avatar
Tom Jeon

Join over 14 million learners and start Joining Data in R with dplyr today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.