## import data
# data(MetaGenotypeData)
## delete first line which contains the names of each column
# temp=MetaGenotypeData[-1,];
# rowNum=nrow(temp)
# gen=matrix(0,nrow=rowNum,ncol=1);
# aff=matrix(0,nrow=rowNum,ncol=1);
# for(j in 1:rowNum){
# gen[j,]=paste(temp[j,14],temp[j,15],sep=" ");
# case_num=length(unlist(strsplit(temp[j,14],split=" ")));
# control_num=length(unlist(strsplit(temp[j,15],split=" ")));
# case_aff=paste(rep(2,case_num),collapse=" ");
# control_aff=paste(rep(1,control_num),collapse=" ");
# aff[j,]=paste(case_aff,control_aff,sep=" ");
# }
# result=I2.TradPerm(gen,aff,split=" ",sep="/",naString="-",
# model="allele",method="MH",repeatNum=1000)
# result
Run the code above in your browser using DataLab