Herein, we will use the base R merge() function and the dplyr join functions to work out how to merge and join data in R, comparing and contrasting the two functions throughout.
In order to do so, the following steps need to be executed:
- Install and load the readr package, which contains functions that read in data much faster than the baseR data read functions:
- Download the students and students2 datasets from the GitHub repository:
students <- read_csv("https://raw.githubusercontent.com/ TrainingByPackt/R-Programming-Fundamentals/master/lesson3/students.csv") students2 <- read_csv("https://raw.githubusercontent.com/ TrainingByPackt/R-Programming-Fundamentals/master/lesson3/students2.csv") ...