View source: R/utility_functions.R
namedList2longDF | R Documentation |
Convert named list to long data.frame. Resulting dataframe will have two columns, the first corresponding to the names within the list, and the second to the corersponding list entries.
namedList2longDF(my.list, name.header = NULL, value.header = NULL)
my.list |
named list |
name.header |
character specifying header name that will be assigned to name column. If unspecified, defaults to "name". |
value.header |
character specifying header name that will be assigned to value column. If unspecified, defaults to "value". |
long data.frame
Nicholas Mikolajewicz
namedList2wideDF
# specify named list
my.list <- list(group.1 = c("a", "b", "c"), group.2 = c("d", "e", "f"))
# convert named list to long data.frame
my.df <- namedList2longDF(my.list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.