R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(1,5,1,5,1,4,0,6,1,1,2,1,3,7,0,1,3,6,3,4,0,1,3,4,0,2,0,5,3,5,1,1,3,4,1,2,1,5,0,1,1,4,0,1,0,2,0,5,0,2,5,8,3,3,0,2,8,4,2,2,0,3,0,2,6,8,0,6,2,5,0,3,3,2,0,3,3,4,0,2,2,4,0,2,1,7,0,1,0,2,1,3,5,4,0,4,0,6,0,2,2,2,4,3,4,4,2,1,0,3,0,3,0,2,0,0,2,5,0,2,3,7,3,4,0,1,0,2,3,6,1,1,1,3,2,4,2,4,0,8,2,5,3,2,3,6,1,2,0,7,1,0,1,0,0,1,0,4,1,2,0,2,2,3,0,2,8,6,1,4,1,1,0,6,1,10,0,2,3,2),dim=c(2,90),dimnames=list(c('part1noncat','part2noncat'),1:90)) > y <- array(NA,dim=c(2,90),dimnames=list(c('part1noncat','part2noncat'),1:90)) > 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 = '2' > 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/1qdyz1358168741.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] [1,] 0 0 [2,] 0 2 [3,] 1 3 [4,] 2 5 [5,] 5 8 $n [1] 90 90 $conf [,1] [,2] [1,] 0.6669068 2.50036 [2,] 1.3330932 3.49964 $out [1] 8 6 8 10 $group [1] 1 1 1 2 $names [1] "part1noncat" "part2noncat" > 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/2cpht1358168741.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/3eajl1358168741.tab") + } > > try(system("convert tmp/1qdyz1358168741.ps tmp/1qdyz1358168741.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.888 0.155 1.064