The first column is assumed to be shared by all dataframes
Usage
join_dfs(df_list, join_fn = dplyr::left_join)
Arguments
- df_list
named list of dataframes
- join_fn
join function to use (Default:
dplyr::left_join
)
Examples
dfs <- list(
"a_vs_b" = data.frame(id = c("a1", "b2", "c3"), score = runif(3)),
"b_vs_c" = data.frame(id = c("a1", "b2", "c3"), score = rnorm(3))
)
dfs %>% join_dfs()
#> Joining with `by = join_by(id)`
#> id a_vs_b_score b_vs_c_score
#> 1 a1 0.7064338 -0.782706041
#> 2 b2 0.9485766 -0.002893626
#> 3 c3 0.1803388 0.413239292