File: mapToList.Rd

package info (click to toggle)
r-bioc-multiassayexperiment 1.16.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 924 kB
  • sloc: sh: 13; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,259 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listToMap.R, R/mapToList.R
\name{listToMap}
\alias{listToMap}
\alias{mapToList}
\title{Convert map from data.frame or DataFrame to list and vice versa}
\usage{
listToMap(listmap)

mapToList(dfmap, assayCol = "assay")
}
\arguments{
\item{listmap}{A named \code{list} object containing \code{DataFrame}s
with "primary" and "colname" columns}

\item{dfmap}{A \code{data.frame} or \code{DataFrame} object with
identifiers in the first column}

\item{assayCol}{A character vector of length one indicating the assay
names column}
}
\value{
A \linkS4class{DataFrame} class object of names

A \code{list} object of DataFrames for each assay
}
\description{
The \code{mapToList} function provides a convenient way of reordering a
\code{data.frame} to a \code{list}. The \code{listToMap} function does the
opposite by taking a \code{list} and converting it to \code{DataFrame}.
}
\section{Functions}{
\itemize{
\item \code{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)
}