R version 2.11.1 (2010-05-31) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(89,95,90,87,82,91,82,84,71,92,80,84,62,84,77,69,80,84,87,84,96,85,80,89,85,83,89,86,89,91,73,90,88,77,86,88,83,88,91,88,98,102,80,103,84,84,90,87,92,88,86,93,117,101,88,88,86,113,78,95,104,99,89,85,99,105,84,105,89,96,95,88,58,93,77,93,77,69,98,83,58,83,81,93,92,69,94,86,87,90,75,87,80,92,84,75,87,89,114,88,97,87,102,113,80,102,112,101,104,87,75,105,82,101,92,79,102,86,73,95,78,104,74,79,92,86,97,81,92,92,91,95,102,97,89,87,98,94,117,105,92,94,70,88,63,105,91,113,106,69,81,69,98,100,88,113,95,88,105,104,90,94,58,91,86,103,112,95,71,69,98,86,87,108,98,83,117,102,98,94,98,113,90,113,84,93,86,105,68,88,86,90,77,92,83,81,90,86,107,85,102,86,90,97,113,103,86,102,105,110,82,89,99,113,91,92,86,91,82,86,86,102,84,80,96,117,88,99,89,86,98,58,98,58,81,90,112,84,84,75,78,94,75,82,87,59,68,80,94,87,70,113,99,90,102,80,98,98,95,104,86,84,85,90,86,97),dim=c(2,162),dimnames=list(c('WJ7ARD','WJ10ARD'),1:162)) > y <- array(NA,dim=c(2,162),dimnames=list(c('WJ7ARD','WJ10ARD'),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 = '0' > par2 = 'FALSE' > par1 = '3' > ylab = 'Test Scores' > xlab = 'CARE Variable Names' > main = 'CARE DATA' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, CARE BoxPlot and Descriptives (v1.0.1) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_varia1.wasp/ > #Source of accompanying publication: > #Technical description: > 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/www/rcomp/tmp/1lz711288021632.ps",horizontal=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/www/rcomp/tmp/2e8om1288021632.ps",horizontal=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,] 62.0 69 [2,] 81.0 84 [3,] 87.5 89 [4,] 95.0 97 [5,] 114.0 113 $n [1] 162 162 $conf [,1] [,2] [1,] 85.76209 87.38623 [2,] 89.23791 90.61377 $out [1] 58 58 58 117 117 117 117 58 58 59 117 $group [1] 1 1 1 1 1 1 1 2 2 2 2 $names [1] "WJ7ARD" "WJ10ARD" > dev.off() null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/3zr5s1288021632.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/www/rcomp/tmp/43rly1288021632.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(z[i], trim=par3/100, na.rm=TRUE), digits=2)) + a<-table.element(a,round(sd(z[i], na.rm=TRUE), digits=2)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/5vil01288021632.tab") > > try(system("convert tmp/1lz711288021632.ps tmp/1lz711288021632.png",intern=TRUE)) character(0) > try(system("convert tmp/2e8om1288021632.ps tmp/2e8om1288021632.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.800 0.450 1.226