#================example test MetaDE.merge========================================================#
label1<-rep(0:1,each=5)
label2<-rep(0:1,each=5)
time1=c(4,3,1,1,2,2,3,10,5,4)
event1=c(1,1,1,0,1,1,0,0,0,1)
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","LPA"),20,replace=TRUE)
symbol2<-sample(c("SST","VGF","CNP","APOE"),20,replace=TRUE)
study1<-cbind(c(NA,NA,symbol1),rbind(rbind(time1,event1),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.raw<-MetaDE.Read(c("study1","study2"),via="txt",skip=c(2,1),log=FALSE)
mydata.matched<-MetaDE.match(mydata.raw,"IQR")
mydata.merged<-MetaDE.merge(mydata.matched)
Run the code above in your browser using DataCamp Workspace