rbind_list {doBy} | R Documentation |
Bind list of data frames and add list names as a column
Description
Binds a named list of data frames (or tibbles) into a single data frame. Adds the list name as a new column (first column).
Usage
rbind_list(lst, name = "name")
Arguments
lst |
A named list of data frames or tibbles. |
name |
A character scalar: name of the column to hold the list names (default "name"). |
Value
A data frame or tibble, depending on the class of the input.
Examples
lst <- list(a = data.frame(x = 1:2), b = data.frame(x = 3:4))
rbind_list(lst)
lst <- split(iris, iris$Species)
rbind_list(lst)
[Package doBy version 4.7.0 Index]