listToMap {MultiAssayExperiment} | R Documentation

## Convert map from data.frame or DataFrame to list and vice versa

### Description

The `mapToList` function provides a convenient way of reordering a `data.frame` to a `list`. The `listToMap` function does the opposite by taking a `list` and converting it to `DataFrame`.

### Usage

    listToMap(listmap)

    mapToList(dfmap, assayCol = "assay")

### Arguments

`listmap` | A named `list` object containing `DataFrame`s with "primary" and "colname" columns
`dfmap` | A `data.frame` or `DataFrame` object with identifiers in the first column
`assayCol` | A character vector of length one indicating the assay names column

### Value

A DataFrame class object of names

A `list` object of DataFrames for each assay

### Functions

- `listToMap`: The inverse of the listToMap operation

### Examples

    example("MultiAssayExperiment")

    ## Create a sampleMap from a list using the listToMap function
    sampMap <- listToMap(maplist)

    ## The inverse operation is also available
    maplist <- mapToList(sampMap)

[Package MultiAssayExperiment version 1.13.21 Index]