R version 2.7.2 (2008-08-25) Copyright (C) 2008 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(72.50,110.40,59.40,96.40,85.70,101.90,88.20,106.20,62.80,81.00,87.00,94.70,79.20,101.00,112.00,109.40,79.20,102.30,132.10,90.70,40.10,96.20,69.00,96.10,59.40,106.00,73.80,103.10,57.40,102.00,81.10,104.70,46.60,86.00,41.40,92.10,71.20,106.90,67.90,112.60,72.00,101.70,145.50,92.00,39.70,97.40,51.90,97.00,73.70,105.40,70.90,102.70,60.80,98.10,61.00,104.50,54.50,87.40,39.10,89.90,66.60,109.80,58.50,111.70,59.80,98.60,80.90,96.90,37.30,95.10,44.60,97.00,48.70,112.70,54.00,102.90,49.50,97.40,61.60,111.40,35.00,87.40,35.70,96.80,51.30,114.10,49.00,110.30,41.50,103.90,72.50,101.60,42.10,94.60,44.10,95.90,45.10,104.70,50.30,102.80,40.90,98.10,47.20,113.90,36.90,80.90,40.90,95.70,38.30,113.20,46.30,105.90,28.40,108.80,78.40,102.30,36.80,99.00,50.70,100.70,42.80,115.50),dim=c(2,61),dimnames=list(c('X1','X2'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('X1','X2'),1:61)) > 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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Notched Boxplots (v1.0.4) 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 > #Technical description: Write here your technical program description > z <- as.data.frame(t(y)) > postscript(file="/var/www/html/rcomp/tmp/1ubbf1225742292.ps",horizontal=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,] 28.4 86.0 [2,] 42.8 96.2 [3,] 54.5 101.7 [4,] 72.0 106.0 [5,] 112.0 115.5 $n [1] 61 61 $conf [,1] [,2] [1,] 48.59289 99.71748 [2,] 60.40711 103.68252 $out [1] 132.1 145.5 81.0 80.9 $group [1] 1 1 2 2 $names [1] "X1" "X2" > 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,r$stats[j,i]) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/23wjh1225742292.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/www/html/rcomp/tmp/3tafz1225742292.tab") > > system("convert tmp/1ubbf1225742292.ps tmp/1ubbf1225742292.png") > > > proc.time() user system elapsed 0.605 0.155 0.655