list2df | R Documentation |
Convert a list with names that have one to many mapping relationships to a data.frame of two columns, one column is names, the other column is the unlist elements
list2df(list, colnames)
list |
input list with names slot |
colnames |
character vector of length 2, indicating the column names of the returned data.frame |
data.frame
list <- list("n1"=c("e1", "e2", "e4"), "n2"=c("e3", "e5"))
list2df(list, colnames=c("name", "element"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.