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(16.3,14.6,8.6,13.8,6.0,17.4,13.8,13.1,13.5,15.5,16.0,27.9,7.3,16.9,12.0,17.9,18.2,15.4,14.0,18.1,18.8,18.0,17.0,19.2,12.2,14.3,19.4,16.0,15.6,12.9,15.7,17.0,14.9,15.7,15.0,12.0,17.6,25.0,15.2,16.8,27.5,29.5,12.5,13.1,18.2,12.1,13.8,10.5,17.8,11.4,12.0,10.8,11.3,11.5,10.1,16.3,15.3,19.7,19.4,12.6,15.7,15.4,16.6,20.8,12.9,18.6,21.0,14.9,23.8,11.0,18.4,14.2,11.0,4.5,13.1,15.1,25.4,13.9,18.1,14.6,9.7,17.3,19.0,13.1,11.1,20.4,15.8,19.7,19.2,8.0,15.2,16.4,15.8,14.6,15.5,19.0,17.6,10.3),dim=c(8,13),dimnames=list(c('1','2','3','4','5','6','7','8'),1:13)) > y <- array(NA,dim=c(8,13),dimnames=list(c('1','2','3','4','5','6','7','8'),1:13)) > 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/1d3361355763040.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] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 9.7 4.5 8.6 10.8 6.0 11.0 10.1 10.5 [2,] 12.9 11.4 13.1 13.1 11.1 12.9 13.8 14.6 [3,] 15.3 15.4 15.2 14.6 15.7 14.6 15.5 17.0 [4,] 17.8 17.3 19.0 16.0 18.2 17.4 16.6 19.0 [5,] 19.2 19.7 21.0 18.1 25.4 20.4 18.4 20.8 $n [1] 13 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 13.15276 12.81454 12.61454 13.32918 12.58869 12.62804 14.273 15.07186 [2,] 17.44724 17.98546 17.78546 15.87082 18.81131 16.57196 16.727 18.92814 $out [1] 27.5 29.5 27.9 25.0 6.0 $group [1] 1 2 4 6 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" Warning message: In bxp(list(stats = c(9.7, 12.9, 15.3, 17.8, 19.2, 4.5, 11.4, 15.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > 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/2lwew1355763040.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/3d8091355763040.tab") > > try(system("convert tmp/1d3361355763040.ps tmp/1d3361355763040.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.929 0.292 1.200