Learn R Programming

ELMER (version 1.4.2)

getSample: getSample to extract sample information from MEE.data object.

Description

getSample is a function to easily extract sample information from MEE.data object. By specifying ID for samples, only that set of samples' informtion will be extracted. When certain columns of data need to be extracted, just specify columns names in cols option and sample information for wanted columns will be reported.

Usage

getSample(object, ID, cols)
"getSample"(object, ID, cols)

Arguments

object
MEE.data object
ID
A vector of sample ID. When specified, sample informtion only for these samples will be output.
cols
A vector of column names of sampleInfo slots of MEE.data object.

Value

Sample information.

Examples

Run this code
SampleInfo <- data.frame(ID=paste0("sample",1:5),
TN=c("Tumor","Tumor","Normal","Normal","Tumor"))
mee <- fetch.mee(sample = SampleInfo)
Samples <- getSample(mee,ID = "sample2") ## get sample2's information
Samples <- getSample(mee, cols = "TN")  ## get 'TN' information for each samples

Run the code above in your browser using DataLab