rbind_named_df_list | R Documentation |
rbinds together data.frames in which the list name is turned into a column and bound to the data.frame becoming the first column of the data.frame
rbind_named_df_list(df_list, sum_col_name = "col_from_list")
df_list |
named list of data.frames |
sum_col_name |
colname of new column bound to data.frame |
a single data.frame row bound data.frame
library(dplyr)
library(delutils)
l <- list(data.frame(A=seq(1,5)), data.frame(A=seq(6, 7))) %>%
setNames(., c('Cond1', 'Cond2'))
rbind_named_df_list(l)
# Doesn't work because list contains matrix
## Not run:
l <- list(data.frame(A=seq(1,5)),
data.frame(A=seq(6, 7)),
matrix(data=NA, ncol=1, nrow=5)) %>%
setNames(., c('Cond1', 'Cond2', 'Cond3'))
rbind_named_df_list(l)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.