This is my data:
list_of_data <- list(mtcars[1:26,], mtcars[4:22,], mtcars[3:15,])
I want to merge the all dataframes by their rownames.
I know that Reduce
comes pretty handy for a problem like this, but I am not able to get in inside my purrr
workflow. Can anyone help me?
I am even not sure if reduce
or reduce2
might be suited to get it work.
This was my try but it does not work:
list_of_data %>%
map(~select(.x, c(cyl, wt))) %>%
reduce2(~merge(.x, .y, all=TRUE))