The first column is assumed to be shared by all dataframes
Usage
join_dfs_wide(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_wide()
#> Joining with `by = join_by(id)`
#> id a_vs_b_score b_vs_c_score
#> 1 a1 0.3891828 -0.93584735
#> 2 b2 0.4611865 -0.01595031
#> 3 c3 0.3152418 -0.82678895