R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" 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(26,21,21,23,17,23,4,20,16,15,24,17,20,4,19,19,18,22,18,20,6,20,16,8,24,20,24,8,25,23,19,27,28,22,4,22,12,20,27,22,20,8,26,19,16,24,16,25,5,22,16,14,23,18,23,4,19,13,14,27,14,22,4,24,20,8,28,11,24,4,26,27,23,27,27,25,4,13,8,9,24,22,28,4,22,13,15,25,23,25,8,21,15,19,24,24,28,7,7,5,6,20,14,21,4,17,14,11,26,23,27,5,25,24,17,23,24,14,4,25,24,17,23,24,14,4,19,9,5,20,8,27,4,23),dim=c(7,20),dimnames=list(c('V1','V2','V3','V4','V5','V6','V7'),1:20)) > y <- array(NA,dim=c(7,20),dimnames=list(c('V1','V2','V3','V4','V5','V6','V7'),1:20)) > 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/wessaorg/rcomp/tmp/1zv081350397294.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] [1,] 13 5 5.0 20.0 8.0 14 4.0 [2,] 19 13 10.0 23.0 16.5 20 4.0 [3,] 22 16 15.5 24.0 21.0 23 4.0 [4,] 25 22 19.0 26.5 23.5 25 6.5 [5,] 26 27 23.0 28.0 28.0 28 8.0 $n [1] 20 20 20 20 20 20 20 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 19.88021 12.82031 12.32031 22.76345 18.52691 21.23351 3.116753 [2,] 24.11979 19.17969 18.67969 25.23655 23.47309 24.76649 4.883247 $out [1] 7 23 $group [1] 1 7 $names [1] "V1" "V2" "V3" "V4" "V5" "V6" "V7" Warning message: In bxp(list(stats = c(13, 19, 22, 25, 26, 5, 13, 16, 22, 27, 5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/2vxam1350397294.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/wessaorg/rcomp/tmp/3wq411350397294.tab") > > try(system("convert tmp/1zv081350397294.ps tmp/1zv081350397294.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.975 0.176 1.125