list2df {signatureSearch} | R 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"))

[Package signatureSearch version 1.6.3 Index]