R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1650,1097,783,961,1607,1374,774,1729,653,1003,963,1170,1249,1075,974,1429,2781,1086,835,2788,1477,2575,759,1407,1806,1226,965,1359,695,1043,834,1195,1902,1817,2136,1324,928,2402,843,1199,2752,1204,949,1934,721,985,8423,1035,696,1152,857,1541,1583,2057,873,929,507,815,899,1232,687,1648,1445,737,633,676,581,698,550,618,633,827,770,712,853,541,858,461,524,1005,759,506,789,850,1244,936,1059,900,556,891,893,734,1050,857,611,963,1032,738,655,900,770,879,772,3007,784,949,1023,1645,1733,1345,924,957,800,1328,881,1473,950,1466,888,1054,1002,2110,1975,1081),dim=c(4,31),dimnames=list(c('UprightFamous','UprightNon-Famous','InvertedFamous','InvertedNon-Famous'),1:31)) > y <- array(NA,dim=c(4,31),dimnames=list(c('UprightFamous','UprightNon-Famous','InvertedFamous','InvertedNon-Famous'),1:31)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par8 = 'TRUE' > par7 = '' > par6 = '0.0' > par5 = 'paired' > par4 = 'Students T-Test' > par3 = '3' > par2 = '1' > par1 = 'two.sided' > ylab = 'Y-Axis Title' > xlab = 'X-Axis Title' > main = 'Boxplots Title' > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > par4 <- as.character(par4) > par5 <- as.character(par5) > par6 <- as.numeric(par6) > if ( par5 == 'unpaired') paired <- FALSE else paired <- TRUE > x <- t(y) > postscript(file="/var/wessaorg/rcomp/tmp/1f22h1331731526.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > (r<-boxplot(x ,xlab=xlab,ylab=ylab,main=main,notch=FALSE,col=2)) $stats [,1] [,2] [,3] [,4] [1,] 507.0 461.0 524.0 541.0 [2,] 708.5 868.0 778.5 914.5 [3,] 928.0 1075.0 873.0 1081.0 [4,] 1530.0 1359.5 964.0 1418.0 [5,] 2752.0 2057.0 1059.0 1934.0 $n [1] 31 31 31 31 $conf [,1] [,2] [,3] [,4] [1,] 694.8777 935.5239 820.3595 938.1186 [2,] 1161.1223 1214.4761 925.6405 1223.8814 $out [1] 2781 2575 2402 2110 2136 8423 1445 1975 2788 3007 $group [1] 1 2 2 2 3 3 3 3 4 4 $names [1] "UprightFamous" "UprightNon-Famous" "InvertedFamous" [4] "InvertedNon-Famous" > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > if( par4 == 'Wilcoxon-Mann_Whitney'){ + a<-table.start() + a <- table.row.start(a) + a <- table.element(a,'Wilcoxon 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) + W <- wilcox.test(x[,par2],x[,par3],alternative=par1, paired = paired) + a<-table.row.start(a) + a<-table.element(a,'Wilcoxon Test',1,TRUE) + a<-table.element(a,W$statistic[[1]]) + a<-table.element(a,round(W$p.value, digits=5) ) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/2ka3b1331731526.tab") + } > if( par4 == 'Students T-Test') + { + a<-table.start() + a <- table.row.start(a) + a <- table.element(a,'Students T-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) + T <- t.test(x[,par2],x[,par3],alternative=par1, paired=paired, mu=par6) + a<-table.row.start(a) + a<-table.element(a,'Students T-Test',1,TRUE) + a<-table.element(a,round(T$statistic[[1]], digits=5) ) + a<-table.element(a,round(T$p.value, digits=5) ) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/37oa11331731526.tab") + } > > try(system("convert tmp/1f22h1331731526.ps tmp/1f22h1331731526.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.566 0.103 0.684