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(68 + ,75 + ,74 + ,69 + ,67 + ,68 + ,72 + ,66 + ,88 + ,66 + ,70 + ,88 + ,71 + ,90 + ,74 + ,70 + ,78 + ,68 + ,68 + ,69 + ,71 + ,74 + ,72 + ,94 + ,73 + ,71 + ,72 + ,70 + ,99 + ,75 + ,73 + ,72 + ,78 + ,63 + ,71 + ,73 + ,80 + ,81 + ,72 + ,75 + ,74 + ,62 + ,72 + ,83 + ,71 + ,75 + ,62 + ,78 + ,69 + ,67 + ,75 + ,100 + ,77 + ,91 + ,81 + ,75 + ,72 + ,81 + ,97 + ,79 + ,75 + ,85 + ,75 + ,92 + ,73 + ,77 + ,72 + ,77 + ,63 + ,77 + ,77 + ,72 + ,78 + ,84 + ,75 + ,77 + ,81 + ,86 + ,82 + ,79 + ,77 + ,100 + ,82 + ,84 + ,85 + ,78 + ,82 + ,86 + ,84 + ,82 + ,78 + ,88 + ,83 + ,91 + ,82 + ,78 + ,88 + ,84 + ,110 + ,82 + ,80 + ,78 + ,85 + ,88 + ,81 + ,80 + ,87 + ,90 + ,73 + ,82 + ,80 + ,87 + ,84 + ,77 + ,85 + ,80 + ,75 + ,79 + ,70 + ,78 + ,80 + ,100 + ,79 + ,94 + ,85 + ,80 + ,97 + ,78 + ,82 + ,80 + ,80 + ,89 + ,83 + ,100 + ,84 + ,80 + ,92 + ,81 + ,99 + ,79 + ,80 + ,92 + ,82 + ,89 + ,84 + ,81 + ,102 + ,84 + ,94 + ,87 + ,81 + ,93 + ,86 + ,81 + ,86 + ,81 + ,87 + ,87 + ,83 + ,81 + ,82 + ,96 + ,87 + ,75 + ,85 + ,82 + ,85 + ,78 + ,92 + ,83 + ,82 + ,72 + ,77 + ,81 + ,79 + ,82 + ,91 + ,100 + ,102 + ,93 + ,82 + ,75 + ,82 + ,73 + ,82 + ,82 + ,62 + ,79 + ,91 + ,78 + ,83 + ,92 + ,90 + ,96 + ,88 + ,83 + ,82 + ,88 + ,79 + ,85 + ,84 + ,88 + ,86 + ,100 + ,84 + ,84 + ,91 + ,86 + ,89 + ,86 + ,84 + ,82 + ,95 + ,82 + ,86 + ,84 + ,92 + ,95 + ,96 + ,92 + ,84 + ,71 + ,84 + ,87 + ,79 + ,84 + ,75 + ,90 + ,86 + ,85 + ,84 + ,82 + ,92 + ,88 + ,85 + ,84 + ,90 + ,87 + ,92 + ,88 + ,85 + ,89 + ,87 + ,67 + ,88 + ,85 + ,91 + ,98 + ,113 + ,87 + ,86 + ,79 + ,79 + ,77 + ,86 + ,86 + ,89 + ,105 + ,78 + ,88 + ,86 + ,73 + ,82 + ,96 + ,82 + ,86 + ,77 + ,84 + ,89 + ,83 + ,86 + ,95 + ,108 + ,97 + ,92 + ,86 + ,92 + ,86 + ,89 + ,90 + ,86 + ,93 + ,89 + ,93 + ,85 + ,86 + ,95 + ,95 + ,103 + ,92 + ,86 + ,82 + ,84 + ,86 + ,85 + ,86 + ,91 + ,96 + ,88 + ,92 + ,86 + ,92 + ,102 + ,95 + ,97 + ,86 + ,82 + ,89 + ,83 + ,87 + ,86 + ,102 + ,92 + ,96 + ,92 + ,87 + ,72 + ,78 + ,85 + ,82 + ,87 + ,102 + ,106 + ,88 + ,97 + ,87 + ,78 + ,98 + ,82 + ,88 + ,87 + ,95 + ,102 + ,91 + ,91 + ,87 + ,95 + ,80 + ,92 + ,84 + ,87 + ,97 + ,99 + ,83 + ,95 + ,88 + ,70 + ,96 + ,97 + ,89 + ,88 + ,81 + ,102 + ,81 + ,97 + ,88 + ,80 + ,112 + ,91 + ,87 + ,88 + ,82 + ,83 + ,79 + ,82 + ,89 + ,81 + ,109 + ,83 + ,95 + ,89 + ,110 + ,105 + ,98 + ,98 + ,89 + ,95 + ,89 + ,89 + ,87 + ,89 + ,93 + ,94 + ,87 + ,90 + ,89 + ,97 + ,109 + ,93 + ,105 + ,89 + ,98 + ,95 + ,100 + ,95 + ,89 + ,79 + ,83 + ,83 + ,85 + ,89 + ,82 + ,103 + ,83 + ,87 + ,90 + ,91 + ,88 + ,102 + ,92 + ,90 + ,105 + ,99 + ,88 + ,97 + ,90 + ,75 + ,97 + ,87 + ,82 + ,90 + ,90 + ,106 + ,101 + ,97 + ,90 + ,102 + ,96 + ,103 + ,97 + ,90 + ,95 + ,88 + ,102 + ,94 + ,90 + ,97 + ,116 + ,96 + ,94 + ,90 + ,95 + ,99 + ,89 + ,91 + ,90 + ,95 + ,95 + ,103 + ,95 + ,91 + ,93 + ,96 + ,84 + ,93 + ,91 + ,91 + ,87 + ,88 + ,89 + ,91 + ,102 + ,105 + ,98 + ,103 + ,91 + ,77 + ,87 + ,100 + ,83 + ,91 + ,104 + ,90 + ,95 + ,89 + ,92 + ,82 + ,111 + ,97 + ,95 + ,92 + ,84 + ,87 + ,101 + ,93 + ,92 + ,106 + ,102 + ,102 + ,104 + ,92 + ,93 + ,95 + ,102 + ,92 + ,92 + ,109 + ,91 + ,93 + ,99 + ,92 + ,97 + ,116 + ,98 + ,109 + ,92 + ,105 + ,84 + ,97 + ,89 + ,94 + ,75 + ,88 + ,83 + ,85 + ,94 + ,97 + ,106 + ,102 + ,102 + ,94 + ,91 + ,98 + ,95 + ,95 + ,95 + ,97 + ,118 + ,89 + ,105 + ,95 + ,75 + ,97 + ,86 + ,93 + ,95 + ,113 + ,109 + ,98 + ,104 + ,96 + ,90 + ,96 + ,80 + ,95 + ,96 + ,79 + ,93 + ,88 + ,92 + ,97 + ,88 + ,104 + ,86 + ,97 + ,97 + ,87 + ,109 + ,103 + ,104 + ,97 + ,92 + ,90 + ,94 + ,100 + ,98 + ,97 + ,95 + ,94 + ,95 + ,98 + ,102 + ,98 + ,105 + ,104 + ,98 + ,99 + ,103 + ,88 + ,106 + ,98 + ,90 + ,109 + ,93 + ,99 + ,98 + ,91 + ,100 + ,90 + ,94 + ,98 + ,111 + ,108 + ,82 + ,100 + ,98 + ,90 + ,78 + ,97 + ,90 + ,98 + ,105 + ,109 + ,108 + ,105 + ,98 + ,82 + ,90 + ,89 + ,87 + ,98 + ,108 + ,114 + ,108 + ,110 + ,98 + ,97 + ,92 + ,98 + ,101 + ,98 + ,104 + ,99 + ,97 + ,99 + ,99 + ,114 + ,110 + ,98 + ,113 + ,99 + ,97 + ,92 + ,92 + ,97 + ,99 + ,102 + ,103 + ,90 + ,100 + ,99 + ,91 + ,97 + ,91 + ,100 + ,102 + ,85 + ,91 + ,99 + ,93 + ,102 + ,78 + ,88 + ,101 + ,97 + ,102 + ,110 + ,112 + ,110 + ,114 + ,102 + ,98 + ,111 + ,104 + ,109 + ,102 + ,105 + ,109 + ,102 + ,112 + ,102 + ,88 + ,104 + ,98 + ,99 + ,104 + ,110 + ,117 + ,104 + ,108 + ,104 + ,105 + ,109 + ,99 + ,109 + ,104 + ,113 + ,106 + ,113 + ,109 + ,105 + ,109 + ,122 + ,95 + ,114 + ,105 + ,110 + ,114 + ,108 + ,112 + ,106 + ,95 + ,112 + ,98 + ,107 + ,107 + ,104 + ,114 + ,92 + ,118 + ,110 + ,104 + ,121 + ,119 + ,118 + ,112 + ,114 + ,123 + ,114 + ,118 + ,112 + ,93 + ,110 + ,108 + ,111 + ,112 + ,102 + ,121 + ,108 + ,114) + ,dim=c(5 + ,146) + ,dimnames=list(c('WJ7ARD' + ,'WJ7AMA' + ,'WJ7AWL' + ,'WJ7AKN' + ,'WJ7ASK') + ,1:146)) > y <- array(NA,dim=c(5,146),dimnames=list(c('WJ7ARD','WJ7AMA','WJ7AWL','WJ7AKN','WJ7ASK'),1:146)) > 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 = '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/html/rcomp/tmp/1aemx1288091765.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/2aemx1288091765.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,] 68.0 62 66 63 66 [2,] 82.0 82 84 84 84 [3,] 88.5 91 92 92 90 [4,] 96.0 97 104 98 98 [5,] 112.0 114 123 119 118 $n [1] 146 146 146 146 146 $conf [,1] [,2] [,3] [,4] [,5] [1,] 86.66934 89.03857 89.38477 90.16934 88.16934 [2,] 90.33066 92.96143 94.61523 93.83066 91.83066 $out numeric(0) $group numeric(0) $names [1] "WJ7ARD" "WJ7AMA" "WJ7AWL" "WJ7AKN" "WJ7ASK" > 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/3dw3k1288091765.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/4gf181288091765.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/5kxze1288091765.tab") > > try(system("convert tmp/1aemx1288091765.ps tmp/1aemx1288091765.png",intern=TRUE)) character(0) > try(system("convert tmp/2aemx1288091765.ps tmp/2aemx1288091765.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.849 0.492 1.044