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)

Arguments

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".

Value

long data.frame

See also

Author

Nicholas Mikolajewicz

Examples


# 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)