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(70.8 + ,70.94826 + ,69.6 + ,70.60826 + ,69.87 + ,68.60826 + ,67.47 + ,68.27826 + ,67.6 + ,67.60826 + ,67.13 + ,65.60826 + ,66.27 + ,68.94826 + ,66.73 + ,67.27826 + ,68.07 + ,64.94826 + ,67.8 + ,67.94826 + ,64.8 + ,64.94826 + ,64.6 + ,65.94826 + ,64.2 + ,66.60826 + ,64.2 + ,64.60826 + ,63.67 + ,63.94826 + ,61 + ,64.60826 + ,59.67 + ,63.60826 + ,59.67 + ,62.94826 + ,59.8 + ,62.94826 + ,60.73 + ,63.60826 + ,59.4 + ,61.60826 + ,58.07 + ,63.60826 + ,57.47 + ,60.27826 + ,70.73 + ,57.94826 + ,72.87 + ,62.94826 + ,66 + ,53.60826 + ,66.07 + ,75.60826 + ,66 + ,74.60826 + ,66.27 + ,73.27826 + ,64 + ,70.27826 + ,63.67 + ,70.27826 + ,63.73 + ,67.60826 + ,63.33 + ,69.60826 + ,63.53 + ,68.60826 + ,63.53 + ,68.27826 + ,62.87 + ,65.94826 + ,59.53 + ,67.94826 + ,62.8 + ,68.94826 + ,60.8 + ,65.94826 + ,59.8 + ,66.27826 + ,56.67 + ,65.60826 + ,57.67 + ,67.94826 + ,58.4 + ,65.60826 + ,55.47 + ,66.60826 + ,56.2 + ,63.94826 + ,71.53 + ,63.60826 + ,68.67 + ,65.94826 + ,65.67 + ,62.94826 + ,66.73 + ,62.27826 + ,67.33 + ,60.94826 + ,66.73 + ,63.94826 + ,66.87 + ,62.27826 + ,65.8 + ,61.27826 + ,64.73 + ,61.94826 + ,65.47 + ,62.94826 + ,63.6 + ,59.60826 + ,64.07 + ,60.27826 + ,64.67 + ,59.94826 + ,63.73 + ,57.60826 + ,62.53 + ,57.94826 + ,61.93 + ,55.27826 + ,62.67 + ,51.27826 + ,62.8 + ,8.60826 + ,61.33 + ,74.27826 + ,62.6 + ,72.94826 + ,59.13 + ,71.94826 + ,61.27 + ,70.27826 + ,59.47 + ,69.94826 + ,57.87 + ,69.94826 + ,59.73 + ,67.94826 + ,61.4 + ,67.94826 + ,58.8 + ,68.27826 + ,58.33 + ,66.27826 + ,57.47 + ,66.27826 + ,57.13 + ,65.94826 + ,55 + ,65.94826 + ,51.53 + ,67.60826 + ,72.73 + ,65.27826 + ,73 + ,66.60826 + ,70.8 + ,64.60826 + ,70.07 + ,64.60826 + ,71.67 + ,64.94826 + ,71.07 + ,61.94826 + ,70.67 + ,62.60826 + ,70.73 + ,62.27826 + ,70.73 + ,61.60826 + ,68.6 + ,60.94826 + ,69.6 + ,62.27826 + ,66.47 + ,59.60826 + ,67.07 + ,59.94826 + ,68.67 + ,58.94826 + ,66.93 + ,60.60826 + ,65.93 + ,59.27826 + ,68.87 + ,59.27826 + ,66.53 + ,58.94826 + ,65.8 + ,58.60826 + ,66.6 + ,53.27826 + ,66 + ,52.60826 + ,65 + ,53.94826 + ,66.8 + ,47.94826 + ,65.6 + ,10.60826 + ,66 + ,7.27826 + ,65.67 + ,70.94826 + ,64.67 + ,71.60826 + ,65.07 + ,69.60826 + ,64.67 + ,70.27826 + ,65.07 + ,69.94826 + ,65.2 + ,70.94826 + ,64.87 + ,69.94826 + ,63.47 + ,69.27826 + ,62.6 + ,68.94826 + ,64.07 + ,70.94826 + ,63.73 + ,67.94826 + ,64.67 + ,67.60826 + ,61.6 + ,67.94826 + ,61.6 + ,67.60826 + ,60.47 + ,67.94826 + ,61.27 + ,67.27826 + ,63 + ,65.94826 + ,61.47 + ,65.60826 + ,60.87 + ,64.94826 + ,61.67 + ,64.27826 + ,62.87 + ,65.94826 + ,62.4 + ,65.60826 + ,59.73 + ,62.94826 + ,60.13 + ,64.60826 + ,58.8 + ,63.94826 + ,59.6 + ,63.60826 + ,58.93 + ,63.94826 + ,60.13 + ,65.27826 + ,58.2 + ,65.27826 + ,58.27 + ,64.27826 + ,58.27 + ,64.27826 + ,55.07 + ,62.94826 + ,53.87 + ,62.60826 + ,52.33 + ,62.27826 + ,47.2 + ,60.60826 + ,37.93 + ,58.94826 + ,72.73 + ,59.60826 + ,70.07 + ,58.27826 + ,70.67 + ,56.94826 + ,72.07 + ,48.27826 + ,68.8 + ,69.94826 + ,68.8 + ,69.27826 + ,67.47 + ,70.60826 + ,66.73 + ,68.27826 + ,66.53 + ,66.60826 + ,66 + ,65.60826 + ,67.6 + ,67.27826 + ,66 + ,67.94826 + ,66 + ,66.27826 + ,66.53 + ,65.60826 + ,65.8 + ,68.94826 + ,64.27 + ,66.94826 + ,64.67 + ,68.27826 + ,64.6 + ,65.27826 + ,64.13 + ,64.94826 + ,65.47 + ,63.94826 + ,62.93 + ,64.60826 + ,63.53 + ,60.94826 + ,62.13 + ,60.94826 + ,63.87 + ,58.60826 + ,64.67 + ,55.27826 + ,63.33 + ,55.27826 + ,63.13 + ,51.27826 + ,62.8 + ,72.27826 + ,62.4 + ,69.27826 + ,62.4 + ,68.27826 + ,62.6 + ,68.27826 + ,61.47 + ,68.27826 + ,62.2 + ,66.27826 + ,63 + ,65.27826 + ,61.8 + ,64.27826 + ,59.73 + ,64.27826 + ,60.33 + ,66.27826 + ,60.13 + ,64.27826 + ,59.53 + ,63.27826 + ,59 + ,65.27826 + ,55.93 + ,64.27826 + ,41.87 + ,64.27826 + ,36.33 + ,62.27826 + ,71.67 + ,62.27826 + ,71.47 + ,64.27826 + ,70.47 + ,62.27826 + ,69.53 + ,63.27826 + ,70.73 + ,60.27826 + ,69.93 + ,58.27826 + ,68.73 + ,55.27826 + ,67.53 + ,51.27826) + ,dim=c(2 + ,189) + ,dimnames=list(c('placement' + ,'none-placement') + ,1:189)) > y <- array(NA,dim=c(2,189),dimnames=list(c('placement','none-placement'),1:189)) > 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 = 'TRUE' > par1 = '3' > ylab = 'Degree Grade' > xlab = 'Degree Type' > main = 'Degree Comparison' > #'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/14dzf1257775669.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/2hdn71257775669.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,] 52.33 53.27826 [2,] 60.80 61.94826 [3,] 64.07 64.94826 [4,] 66.73 67.94826 [5,] 73.00 75.60826 $n [1] 189 189 $conf [,1] [,2] [1,] 63.38848 64.25869 [2,] 64.75152 65.63783 $out [1] 36.33000 37.93000 41.87000 47.20000 51.53000 7.27826 8.60826 10.60826 [9] 47.94826 48.27826 51.27826 51.27826 51.27826 52.60826 $group [1] 1 1 1 1 1 2 2 2 2 2 2 2 2 2 $names [1] "placement" "none-placement" > 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/3dy471257775669.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/4ah6t1257775669.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/5mxvt1257775669.tab") > > system("convert tmp/14dzf1257775669.ps tmp/14dzf1257775669.png") > system("convert tmp/2hdn71257775669.ps tmp/2hdn71257775669.png") > > > proc.time() user system elapsed 0.601 0.327 0.709