selectClass: Function to select class labels from MetaArray object

Description Usage Arguments Value Note Author(s) Examples

Description

Function selects one column from each clinical data matrix and binds them into a list object

Usage

1
selectClass(x, varname, type)

Arguments

x

MetaArray object

varname

Character String specifying which column of clinical data should be selected

type

if factor then factor vector is returned , if binary then vector of 1's and 0' is returned as class labels

Value

A list where each slot refers to one clinical data matrix (study) and contains selected class labels of the samples.

Note

Such a class labels extraction is necessary for some methods of meta-analysis of microarray

Author(s)

Ivana Ihnatova

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(Singhdata)

cl1<-as.data.frame(Singhdata$classes[[1]])
names(cl1)<-"classlab"
cl2<-as.data.frame(Singhdata$classes[[2]])
names(cl2)<-"classlab"
cl3<-as.data.frame(Singhdata$classes[[3]])
names(cl3)<-"classlab"
rownames(Singhdata$esets[[1]])<-Singhdata$geneNames
rownames(Singhdata$esets[[2]])<-Singhdata$geneNames
rownames(Singhdata$esets[[3]])<-Singhdata$geneNames

dataset<-new("MetaArray", GEDM=list(Singhdata$esets[[1]], Singhdata$esets[[2]], Singhdata$esets[[3]]),
clinical=list(cl1, cl2, cl3), datanames=c("dataset1", "dataset2", "dataset3"))

selectClass(dataset, "classlab", "factor")
selectClass(dataset, "classlab", "binary")

MAMA documentation built on Jan. 15, 2017, 3:05 p.m.

Related to selectClass in MAMA...