O'Reilly logo

R Programming Fundamentals by Kaelen Medeiros

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Demonstrating Merges and Joins in R

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:

  1. Install and load the readr package, which contains functions that read in data much faster than the baseR data read functions:
install.packages("readr") library(readr)
  1. 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") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required