R/make.matrix.R

make.matrix<-function(lists)
{
n.method<-length(lists)
names.method<-names(lists)
temp1<-lists[[1]]
for (i in 2:n.method) {temp1<-c(temp1,lists[[i]])}
genes<-unique(temp1)

HeatMatr<-c(rep(0,length(genes)))
HeatMatr[genes %in% lists[[1]]]<-1
for (i in 2:n.method)
{
temp3<-c(rep(0,length(genes)))
temp3[genes %in% lists[[i]]]<-1
HeatMatr<-cbind(HeatMatr,temp3)
}
rownames(HeatMatr)<-genes
colnames(HeatMatr)<-names.method
return(HeatMatr)
}

Try the MAMA package in your browser

Any scripts or data that you put into this service are public.

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