mapToList: Convert map from data.frame or DataFrame to list and vice...

Description Usage Arguments Value Functions Examples

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

1
2
3
listToMap(listmap, type = "colnames")

mapToList(dfmap, assayCol = "assay")

Arguments

listmap

A named list object containing either experiments (assays), samples (colnames) or features (rownames)

type

Any of the valid types of maps including colnames, rownames, and assays.

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

Examples

1
2
3
4
5
6
7
example("MultiAssayExperiment")

## Create a sampleMap from a list using the listToMap function
mySampleMap <- listToMap(mylist)

## The inverse operation is also available
mylist <- mapToList(mySampleMap)

vjcitn/MultiAssayExperiment documentation built on May 3, 2019, 6:13 p.m.