R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(95,84,92,97,85,88,83,87,73,92,81,91,63,80,77,73,82,73,82,77,95,86,85,82,88,82,98,73,87,99,71,90,89,78,86,100,88,73,93,95,95,93,78,91,84,81,97,98,95,88,88,90,121,85,97,79,82,107,82,82,108,98,90,84,113,99,86,89,105,105,105,94,60,92,75,81,79,NA,104,86,60,90,87,101,93,73,85,88,97,90,67,84,85,89,86,73,88,98,114,82,97,77,93,107,80,84,118,93,109,96,81,107,79,95,104,89,97,82,75,92,82,100,71,75,92,94,104,83,99,92,89,102,114,98,95,94,106,83,117,107,109,107,74,91,63,83,103,100,107,77,86,74,99,92,87,100,93,92,114,93,82,89,60,86,83,97,111,82,75,73,94,93,91,97,100,93,121,89,90,86,105,89,97,107,92,90,92,104,67,96,90,93,85,104,85,83,97,92,118,83,109,83,94,96,121,84,85,107,112,118,93,85,97,121,83,89,92,89,82,85,92,112,79,84,92,118,82,100,87,97,87,70,110,60,81,94,114,85,85,79,82,102,73,78,84,70,66,79,95,95,69,109,100,91,99,84,101,99,104,109,87,88,87,95,92,100),dim=c(2,162),dimnames=list(c('WJ7AKN','WJ10AKN'),1:162)) > y <- array(NA,dim=c(2,162),dimnames=list(c('WJ7AKN','WJ10AKN'),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = '5' > par2 = 'FALSE' > par1 = '2' > ylab = 'Test Scores' > xlab = 'CARE Variable Names' > main = 'CARE AGE 7 DATA' > par1 <- as.numeric(par1) #colour > par2<- as.logical(par2) # Notches ? > par3<-as.numeric(par3) # % trim > if(par3>45){par3<-45;warning('trim limited to 45%')} > if(par3<0){par3<-0;warning('negative trim makes no sense. Trim is zero.')} > lotrm<-as.integer(length(y[1,])*par3/100)+1 > hitrm<-as.integer(length(y[1,])*(100-par3)/100) > y1<-array(dim=c(dim(y)[1], hitrm-lotrm+1), dimnames=list(dimnames(y)[[1]], 1:(hitrm-lotrm+1) )) > for(i in 1:dim(y)[1]){ + tmp<-order(y[i,]) + y1[i,]<- y[i, tmp[lotrm:hitrm] ] + } > postscript(file="/var/wessaorg/rcomp/tmp/1x42w1382440841.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pairs(t(y)) > dev.off() null device 1 > y<-y1 > z <- as.data.frame(t(y)) > postscript(file="/var/wessaorg/rcomp/tmp/2q6k01382440841.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > (r<-boxplot(z ,xlab=xlab,ylab=ylab,main=main,notch=par2,col=par1)) $stats [,1] [,2] [1,] 67 73 [2,] 83 83 [3,] 88 90 [4,] 97 95 [5,] 114 107 $n [1] 145 145 $conf [,1] [,2] [1,] 86.16303 88.42546 [2,] 89.83697 91.57454 $out numeric(0) $group numeric(0) $names [1] "WJ7AKN" "WJ10AKN" > 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") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/overview.htm','Boxplot statistics','Boxplot overview'),6,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/lower_whisker.htm','lower whisker','definition of lower whisker'),1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/lower_hinge.htm','lower hinge','definition of lower hinge'),1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/central_tendency.htm','median','definitions about measures of central tendency'),1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/upper_hinge.htm','upper hinge','definition of upper hinge'),1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/upper_whisker.htm','upper whisker','definition of upper whisker'),1,TRUE) > a<-table.row.end(a) > for (i in 1:length(y[,1])) + { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],1,TRUE) + for (j in 1:5) + { + a<-table.element(a,round(r$stats[j,i], digits=2)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3m5iq1382440841.tab") > if (par2){ + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Boxplot Notches',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Variable',1,TRUE) + a<-table.element(a,'lower bound',1,TRUE) + a<-table.element(a,'median',1,TRUE) + a<-table.element(a,'upper bound',1,TRUE) + a<-table.row.end(a) + for (i in 1:length(y[,1])) + { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],1,TRUE) + a<-table.element(a,round(r$conf[1,i], digits=2)) + a<-table.element(a, round(r$stats[3,i], digits=2)) + a<-table.element(a,round(r$conf[2,i], digits=2)) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/4nw3r1382440841.tab") + } > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Boxplot Means',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/trimmed_mean.htm','trimmed mean','definition of trimmed mean'),1,TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/unbiased1.htm','unbiased SD','definition of unbiased SD'),1,TRUE) > a<-table.row.end(a) > for (i in 1:length(y[,1])) + { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],1,TRUE) + a<-table.element(a,round(mean(unlist(z[i]), trim=par3/100, na.rm=TRUE), digits=2)) + a<-table.element(a,round(sd(unlist(z[i]), na.rm=TRUE), digits=2)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/5kpgb1382440841.tab") > > try(system("convert tmp/1x42w1382440841.ps tmp/1x42w1382440841.png",intern=TRUE)) character(0) > try(system("convert tmp/2q6k01382440841.ps tmp/2q6k01382440841.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.351 0.492 2.817