Chapter 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.
This chapter is the last one 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., 2020b), which we already encountered as a core citizen of the tidyverse. 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
Wickham, H., François, R., Henry, L., & Müller, K. (2020b). dplyr: A grammar of data manipulation. Retrieved from https://CRAN.R-project.org/package=dplyr