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(30 + ,31 + ,34 + ,27 + ,36 + ,34 + ,37 + ,35 + ,30 + ,37 + ,35 + ,40 + ,30 + ,30 + ,31 + ,28 + ,37 + ,28 + ,32 + ,32 + ,30 + ,33 + ,30 + ,28 + ,35 + ,25 + ,30 + ,34 + ,32 + ,30 + ,35 + ,38 + ,30 + ,28 + ,29 + ,35 + ,35 + ,33 + ,30 + ,39 + ,31 + ,30 + ,31 + ,31 + ,31 + ,33 + ,30 + ,30 + ,31 + ,24 + ,30 + ,31 + ,34 + ,27 + ,34 + ,26 + ,31 + ,33 + ,30 + ,33 + ,23 + ,26 + ,30 + ,35 + ,32 + ,26 + ,30 + ,30 + ,36 + ,28 + ,28 + ,27 + ,29 + ,34 + ,36 + ,29 + ,34 + ,28 + ,37 + ,32 + ,30 + ,26 + ,30 + ,29 + ,27 + ,25 + ,32 + ,37 + ,39 + ,24 + ,31 + ,24 + ,31 + ,23 + ,30 + ,31 + ,30 + ,26 + ,29 + ,31 + ,29 + ,31 + ,35 + ,25 + ,27 + ,23 + ,33 + ,31 + ,30 + ,38 + ,19 + ,18 + ,36 + ,29 + ,30 + ,28 + ,37 + ,30 + ,30 + ,28 + ,29 + ,23 + ,33 + ,25 + ,30 + ,27 + ,30 + ,20 + ,26 + ,35 + ,36 + ,19 + ,30 + ,24 + ,30 + ,24 + ,32 + ,29 + ,21 + ,26 + ,31 + ,28 + ,30 + ,32 + ,33 + ,28 + ,29 + ,23 + ,35 + ,27 + ,43 + ,31 + ,30 + ,24 + ,31 + ,23 + ,31 + ,26 + ,30 + ,32 + ,30 + ,20 + ,35 + ,29 + ,36 + ,28 + ,33 + ,27 + ,31 + ,20 + ,28 + ,21 + ,32 + ,31 + ,20 + ,21 + ,30 + ,21 + ,27 + ,24 + ,30 + ,29 + ,29 + ,26 + ,29 + ,29 + ,22 + ,27 + ,30 + ,32 + ,30 + ,26 + ,26 + ,18 + ,28 + ,25 + ,30 + ,19 + ,30 + ,27 + ,31 + ,14 + ,25 + ,16 + ,30 + ,25 + ,19 + ,26 + ,2 + ,25 + ,32 + ,24 + ,24 + ,29 + ,31 + ,10 + ,30 + ,24 + ,4 + ,22 + ,1 + ,22 + ,4 + ,10 + ,0 + ,24 + ,0 + ,24 + ,NA + ,33 + ,NA + ,27 + ,NA + ,24 + ,NA + ,25 + ,NA + ,24 + ,NA + ,16 + ,NA + ,37 + ,NA + ,28 + ,NA + ,20 + ,NA + ,24 + ,NA + ,24 + ,NA + ,30 + ,NA + ,26 + ,NA + ,20 + ,NA + ,23 + ,NA + ,12 + ,NA + ,24 + ,NA + ,16 + ,NA + ,26 + ,NA + ,11 + ,NA + ,25 + ,NA + ,3 + ,NA + ,24 + ,NA + ,34 + ,NA + ,26 + ,NA + ,29 + ,NA + ,26 + ,NA + ,1 + ,NA + ,29 + ,NA + ,10 + ,NA + ,8 + ,NA + ,10 + ,NA + ,23 + ,NA + ,15 + ,NA + ,12 + ,NA + ,24 + ,NA + ,3 + ,NA + ,6 + ,NA + ,21 + ,NA + ,24 + ,NA + ,14 + ,NA + ,1 + ,NA + ,15 + ,NA + ,21 + ,NA + ,0 + ,NA + ,0 + ,NA + ,18 + ,NA + ,0 + ,NA + ,4 + ,NA + ,0 + ,NA + ,0 + ,NA + ,0 + ,NA + ,0 + ,NA + ,0) + ,dim=c(2 + ,168) + ,dimnames=list(c('pr_UK' + ,'pr_B') + ,1:168)) > y <- array(NA,dim=c(2,168),dimnames=list(c('pr_UK','pr_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/wessaorg/rcomp/tmp/1lxrq1353927657.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,] 25 10.0 [2,] 29 21.0 [3,] 30 26.0 [4,] 32 29.5 [5,] 36 40.0 $n [1] 114 168 $conf [,1] [,2] [1,] 29.55606 24.96385 [2,] 30.44394 27.03615 $out [1] 37 37 23 37 39 19 37 21 43 20 22 19 2 24 4 1 4 0 0 3 1 8 3 6 1 [26] 0 0 0 4 0 0 0 0 0 $group [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 $names [1] "pr_UK" "pr_B" > 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/2kucc1353927657.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/3h0rd1353927657.tab") > > try(system("convert tmp/1lxrq1353927657.ps tmp/1lxrq1353927657.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.940 0.210 1.135