#================example test MetaDE.Read ==================================================#
setwd(tempdir())
label1<-rep(0:1,each=5)
label2<-rep(0:1,each=5)
exp1<-cbind(matrix(rnorm(5*20),20,5),matrix(rnorm(5*20,2),20,5))
exp2<-cbind(matrix(rnorm(5*20),20,5),matrix(rnorm(5*20,1.5),20,5))
rownames(exp1)<-paste("g1",1:20,sep="_")
rownames(exp2)<-paste("g2",1:20,sep="_")
study1<-rbind(label1,exp1)
study2<-rbind(label2,exp2)
write.table(study1,"study1.txt",sep="t")
write.table(study1,"study2.txt",sep="t")
mydata<-MetaDE.Read(c("study1","study2"),via="txt",skip=rep(1,2),matched=TRUE,log=FALSE)
#================Non-matched =============================================================#
label1<-rep(0:1,each=5)
label2<-rep(0:1,each=5)
exp1<-cbind(matrix(rnorm(5*20),20,5),matrix(rnorm(5*20,2),20,5))
exp2<-cbind(matrix(rnorm(5*20),20,5),matrix(rnorm(5*20,1.5),20,5))
rownames(exp1)<-paste("g1",1:20,sep="_")
rownames(exp2)<-paste("g2",1:20,sep="_")
symbol1<-sample(c("SST","VGF","CNP"),20,replace=TRUE)
symbol2<-sample(c("SST","VGF","CNP"),20,replace=TRUE)
study1<-cbind(c(NA,symbol1),rbind(label1,exp1))
study2<-cbind(c(NA,symbol2),rbind(label2,exp2))
setwd(tempdir())
write.table(study1,"study1.txt",sep="t")
write.table(study2,"study2.txt",sep="t")
mydata<-MetaDE.Read(c("study1","study2"),via="txt",skip=rep(1,2),log=FALSE)
Run the code above in your browser using DataLab