R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(79 + ,77 + ,81 + ,73 + ,77 + ,80 + ,78 + ,81 + ,73 + ,77 + ,80 + ,78 + ,83 + ,73 + ,78 + ,81 + ,79 + ,83 + ,75 + ,79 + ,81 + ,79 + ,83 + ,77 + ,80 + ,82 + ,79 + ,83 + ,78 + ,81 + ,82 + ,80 + ,84 + ,79 + ,81 + ,83 + ,80 + ,84 + ,80 + ,82 + ,83 + ,80 + ,84 + ,80 + ,82 + ,84 + ,80 + ,84 + ,81 + ,82 + ,85 + ,81 + ,84 + ,81 + ,82 + ,85 + ,81 + ,84 + ,82 + ,82 + ,85 + ,81 + ,85 + ,83 + ,82 + ,85 + ,82 + ,85 + ,83 + ,83 + ,86 + ,82 + ,85 + ,83 + ,83 + ,86 + ,82 + ,86 + ,84 + ,83 + ,86 + ,82 + ,86 + ,84 + ,83 + ,87 + ,82 + ,86 + ,84 + ,83 + ,88 + ,82 + ,86 + ,84 + ,83 + ,88 + ,84 + ,86 + ,84 + ,84 + ,88 + ,84 + ,86 + ,84 + ,84 + ,88 + ,85 + ,86 + ,84 + ,84 + ,88 + ,86 + ,87 + ,84 + ,84 + ,88 + ,86 + ,87 + ,85 + ,84 + ,88 + ,86 + ,87 + ,86 + ,85 + ,89 + ,86 + ,87 + ,86 + ,86 + ,89 + ,86 + ,87 + ,87 + ,86 + ,89 + ,86 + ,87 + ,87 + ,86 + ,89 + ,86 + ,88 + ,87 + ,86 + ,90 + ,86 + ,88 + ,87 + ,87 + ,90 + ,87 + ,88 + ,88 + ,88 + ,91 + ,88 + ,88 + ,88 + ,88 + ,91 + ,88 + ,88 + ,88 + ,88 + ,91 + ,88 + ,88 + ,89 + ,89 + ,91 + ,88 + ,88 + ,89 + ,89 + ,91 + ,89 + ,88 + ,89 + ,89 + ,91 + ,89 + ,88 + ,89 + ,89 + ,91 + ,89 + ,88 + ,89 + ,89 + ,91 + ,90 + ,89 + ,89 + ,89 + ,91 + ,90 + ,89 + ,89 + ,90 + ,92 + ,90 + ,90 + ,90 + ,90 + ,92 + ,91 + ,90 + ,90 + ,90 + ,92 + ,91 + ,90 + ,90 + ,90 + ,93 + ,91 + ,91 + ,90 + ,90 + ,93 + ,91 + ,91 + ,90 + ,91 + ,94 + ,91 + ,91 + ,90 + ,91 + ,94 + ,92 + ,92 + ,90 + ,91 + ,94 + ,92 + ,92 + ,91 + ,92 + ,94 + ,92 + ,92 + ,91 + ,92 + ,95 + ,92 + ,92 + ,91 + ,92 + ,95 + ,92 + ,93 + ,92 + ,92 + ,95 + ,92 + ,93 + ,92 + ,92 + ,95 + ,92 + ,93 + ,94 + ,92 + ,96 + ,92 + ,93 + ,94 + ,92 + ,96 + ,93 + ,93 + ,94 + ,93 + ,97 + ,94 + ,94 + ,94 + ,93 + ,97 + ,94 + ,94 + ,94 + ,93 + ,97 + ,95 + ,94 + ,94 + ,93 + ,97 + ,95 + ,94 + ,95 + ,93 + ,97 + ,95 + ,95 + ,95 + ,93 + ,98 + ,95 + ,95 + ,96 + ,94 + ,98 + ,95 + ,95 + ,96 + ,94 + ,98 + ,96 + ,95 + ,96 + ,94 + ,98 + ,96 + ,95 + ,96 + ,95 + ,98 + ,96 + ,96 + ,96 + ,95 + ,98 + ,97 + ,97 + ,97 + ,96 + ,98 + ,97 + ,97 + ,97 + ,96 + ,98 + ,97 + ,99 + ,98 + ,96 + ,100 + ,98 + ,100 + ,98 + ,97 + ,100 + ,98 + ,101 + ,98 + ,97 + ,100 + ,99 + ,101 + ,100 + ,97 + ,102 + ,100 + ,101 + ,100 + ,98 + ,102 + ,100 + ,102 + ,101 + ,98 + ,102 + ,100 + ,102 + ,102 + ,98 + ,102 + ,102 + ,102 + ,103 + ,98 + ,102 + ,103 + ,102 + ,104 + ,99 + ,103 + ,103 + ,103 + ,105 + ,99 + ,103 + ,103 + ,103 + ,105 + ,100 + ,104 + ,104 + ,103 + ,105 + ,100 + ,104 + ,105 + ,104 + ,105 + ,100 + ,106 + ,105 + ,104 + ,105 + ,100 + ,106 + ,105 + ,105 + ,106 + ,101 + ,106 + ,105 + ,105 + ,106 + ,102 + ,107 + ,105 + ,105 + ,107 + ,104) + ,dim=c(5 + ,84) + ,dimnames=list(c('WJ10AFS' + ,'WJ10AVA' + ,'WJ10ARD' + ,'WJ10AM' + ,'WJ10AKN') + ,1:84)) > y <- array(NA,dim=c(5,84),dimnames=list(c('WJ10AFS','WJ10AVA','WJ10ARD','WJ10AM','WJ10AKN'),1:84)) > 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 Year 10; 10% Trim' > #'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/html/rcomp/tmp/1kzhp1288055582.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/html/rcomp/tmp/2kzhp1288055582.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] [,3] [,4] [,5] [1,] 79 77.0 81 73 77.0 [2,] 88 84.5 86 84 84.0 [3,] 92 91.0 90 90 90.0 [4,] 98 96.0 95 96 94.5 [5,] 107 105.0 105 107 104.0 $n [1] 84 84 84 84 84 $conf [,1] [,2] [,3] [,4] [,5] [1,] 90.27608 89.01749 88.44847 87.9313 88.18988 [2,] 93.72392 92.98251 91.55153 92.0687 91.81012 $out numeric(0) $group numeric(0) $names [1] "WJ10AFS" "WJ10AVA" "WJ10ARD" "WJ10AM" "WJ10AKN" > dev.off() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/html/rcomp/tmp/3grxg1288055582.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/html/rcomp/tmp/4rie11288055582.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/html/rcomp/tmp/5c1uo1288055582.tab") > > try(system("convert tmp/1kzhp1288055582.ps tmp/1kzhp1288055582.png",intern=TRUE)) character(0) > try(system("convert tmp/2kzhp1288055582.ps tmp/2kzhp1288055582.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.703 0.406 0.866