Chapter 8 Joining data

ds4psy: (8) Joining data

A serious limitation of our data wrangling experiences so far is that they only involved a single data table. In fact, this is rarely the case when we tackle realistic data science projects. Thus, in this chapter, we will start with 2 tables and learn combining them in various ways. This is still relatively simple, but can easily be generalized to multiple tables.

Joining data with **dplyr** is the final chapter in the _wrangle_ part of this book.

Figure 8.1: Joining data with dplyr is the final chapter in the wrangle part of this book.

This chapter is still in the Data wrangling part of this book. The commands that we will use for joining 2 tables are implemented in the dplyr package (Wickham et al., 2020), which we already encountered as a core citizen of the tidyverse (Wickham, 2019c). In addition to the so-called 1-table verbs that we discussed in Chapter 3 on Data transformation, we will now learn additional 2-table verbs that allow combining the variables (columns) or cases (rows) of 2 tables x and y.


Wickham, H. (2019c). tidyverse: Easily install and load the ’tidyverse’. Retrieved from

Wickham, H., François, R., Henry, L., & Müller, K. (2020). dplyr: A grammar of data manipulation. Retrieved from