par2 <- as.numeric(par2) par3 <- as.numeric(par3) x <- t(y) load(file='createtable') a<-table.start() a <- table.row.start(a) a <- table.element(a,'Kolmogorov_Smirnov Test',3,TRUE) a <- table.row.end(a) a <- table.row.start(a) a <- table.element(a,'',1,TRUE) a <- table.element(a,'Statistic',1,TRUE) a <- table.element(a,'P-value',1,TRUE) a <- table.row.end(a) D <- ks.test(x[,par2],x[,par3],alternative=par1) a<-table.row.start(a) a<-table.element(a,'K-S Test',1,TRUE) a<-table.element(a,round(D$statistic[[1]], digits=5) ) a<-table.element(a,round(D$p.value, digits =5) ) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab') a<-table.start() a <- table.row.start(a) a <- table.element(a,'Means of Data Distributions ',3,TRUE) a <- table.row.end(a) a <- table.row.start(a) a <- table.element(a,'Mean 1',1,TRUE) a <- table.element(a,'Mean 2',1,TRUE) a <- table.element(a,'Difference',1,TRUE) a <- table.row.end(a) a<-table.row.start(a) a<-table.element(a,round(mean(x[,par2]), digits=5),1) a<-table.element(a,round(mean(x[,par3]), digits=5),1) a<-table.element(a,round( (mean(x[,par2])- mean(x[,par3])), digits=5),1) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.tab')
|