R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(31,96,39,36,37,35,8,31,14,28,27,39,22,32,30,34,26,32,20,21,37,38,26,36,30,39,26,29,20,26,22,27,32,19,5,25,19,23,18,24,6,23,11,26,12,22,24,24,14,24,23,21,21,14,17,25,21,24,21,20,20,18,12,26,26,17,21,28,17,20,21,34,18,23,15,17,3,12,11,17,23,21,21,15,21,20,17,15,18,20,20,13,15,24,9,17,13,28,4,18,7,12,16,17,19,31,10,16,22,9,27,13,11,8,18,18,7,8,2,19,12,18,19,8,8,15,21,12,16,15,15,23,25,15,13,12,17,17,14,18,10,19,16,15,15,15,10,9,19,8,16,10,13,17,11,11,10,16,14,6,19,8,10,13,3,17,13,16,11,16,12,18,17,7,10,12,14,11,10,18,10,14,11,16,14,11,12,19,1,12,14,8,5,25,6,18,10,10,12,6,7,10,1,14,10,12,10,11,5,13,5,8,5,14,3,10,6,8,4,12,1,9,0,16,1,12,0,13,NA,9,NA,10,NA,4,NA,12,NA,8,NA,16,NA,7,NA,7,NA,10,NA,8,NA,13,NA,15,NA,6,NA,7,NA,8,NA,7,NA,10,NA,6,NA,10,NA,10,NA,5,NA,1,NA,6,NA,10,NA,7,NA,9,NA,5,NA,12,NA,5,NA,10,NA,21,NA,6,NA,5,NA,6,NA,4,NA,4,NA,5,NA,7,NA,8,NA,3,NA,3,NA,0,NA,4,NA,1,NA,0,NA,2,NA,2,NA,0,NA,0,NA,0,NA,0,NA,0,NA,0,NA,0),dim=c(2,168),dimnames=list(c('ch_UK','ch_B'),1:168)) > y <- array(NA,dim=c(2,168),dimnames=list(c('ch_UK','ch_B'),1:168)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'grey' > ylab = 'value' > xlab = 'variables' > main = 'Notched Boxplots' > par1 <- 'grey' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Notched Boxplots (v1.0.6) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_notchedbox1.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > z <- as.data.frame(t(y)) > postscript(file="/var/fisher/rcomp/tmp/19jey1353927919.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=TRUE,col=par1)) $stats [,1] [,2] [1,] 0 0.0 [2,] 10 8.0 [3,] 14 13.0 [4,] 20 19.5 [5,] 32 36.0 $n [1] 114 168 $conf [,1] [,2] [1,] 12.52019 11.59815 [2,] 15.47981 14.40185 $out [1] 39 37 37 96 39 38 39 $group [1] 1 1 1 2 2 2 2 $names [1] "ch_UK" "ch_B" > dev.off() null device 1 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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,r$stats[j,i]) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/2cs0b1353927919.tab") > 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,r$conf[1,i]) + a<-table.element(a,r$stats[3,i]) + a<-table.element(a,r$conf[2,i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/34vq11353927919.tab") > > try(system("convert tmp/19jey1353927919.ps tmp/19jey1353927919.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.902 0.211 1.097