multi_join: Merging of up to five data sets at the same time

View source: R/multi_join.r

multi_joinR Documentation

Merging of up to five data sets at the same time

Description

This function joins up to five data sets using the function dplyrinner_join from the package "dplyr". Each data set is individually joined with the next one. This way, several data sets of which only pairs have the same id variable can be joined.

Usage

multi_join(...)

Arguments

...

Up to five data frames that should be joined.

Value

A data frame.

Examples

# Creating several data frames.
id <- c(1:100)
var1 <- runif(100, 1, 5)
var2 <- runif(100, 1, 5)
var3 <- runif(100, 1, 5)
data1 <- data.frame(id, var1)
data2 <- data.frame(id, var2)
data3 <- data.frame(id, var3)

# Join all of them
multi_join(data1, data2, data3)

masurp/pmmisc documentation built on May 3, 2024, 7:13 p.m.