list2df: Named list to data frame

View source: R/utilities.R

list2dfR Documentation

Named list to data frame

Description

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

Usage

list2df(list, colnames)

Arguments

list

input list with names slot

colnames

character vector of length 2, indicating the column names of the returned data.frame

Value

data.frame

Examples

list <- list("n1"=c("e1", "e2", "e4"), "n2"=c("e3", "e5"))
list2df(list, colnames=c("name", "element"))

girke-lab/signatureSearch documentation built on Feb. 21, 2024, 8:32 a.m.