Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

join_all

Recursively join a list of data frames.


Description

Recursively join a list of data frames.

Usage

join_all(dfs, by = NULL, type = "left", match = "all")

Arguments

dfs

A list of data frames.

by

character vector of variable names to join by. If omitted, will match on all common variables.

type

type of join: left (default), right, inner or full. See details for more information.

match

how should duplicate ids be matched? Either match just the "first" matching row, or match "all" matching rows. Defaults to "all" for compatibility with merge, but "first" is significantly faster.

Examples

dfs <- list(
  a = data.frame(x = 1:10, a = runif(10)),
  b = data.frame(x = 1:10, b = runif(10)),
  c = data.frame(x = 1:10, c = runif(10))
)
join_all(dfs)
join_all(dfs, "x")

plyr

Tools for Splitting, Applying and Combining Data

v1.8.6
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.