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(41,50,74,158,99,136,238,298,327,39,59,62,124,107,161,213,273,324,50,63,55,140,112,171,257,312,285,40,32,84,109,90,149,293,249,243,43,39,94,114,98,184,212,286,241,38,47,70,77,125,155,246,279,287,44,53,108,120,155,276,353,309,355,35,60,139,133,190,224,339,401,460,39,57,120,110,236,213,308,309,364,35,52,97,92,189,279,247,328,487,29,70,126,97,174,268,257,353,452,49,90,149,78,178,287,322,354,391),dim=c(9,12),dimnames=list(c('1966','1967','1968','1969','1970','1971','1972','1973','1974'),1:12)) > y <- array(NA,dim=c(9,12),dimnames=list(c('1966','1967','1968','1969','1970','1971','1972','1973','1974'),1:12)) > 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/1bvls1355855870.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] [,9] [1,] 29.0 32.0 55.0 77.0 90.0 136.0 212 249.0 241.0 [2,] 36.5 48.5 72.0 94.5 103.0 158.0 242 282.5 286.0 [3,] 39.5 55.0 95.5 112.0 140.0 198.5 257 309.0 341.0 [4,] 43.5 61.5 123.0 128.5 183.5 272.0 315 340.5 421.5 [5,] 50.0 70.0 149.0 158.0 236.0 287.0 353 401.0 487.0 $n [1] 12 12 12 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 36.30725 49.07061 72.23856 96.49237 103.2834 146.5038 223.7042 282.5458 [2,] 42.69275 60.92939 118.76144 127.50763 176.7166 250.4962 290.2958 335.4542 [,9] [1,] 279.1975 [2,] 402.8025 $out [1] 90 $group [1] 2 $names [1] "1966" "1967" "1968" "1969" "1970" "1971" "1972" "1973" "1974" Warning message: In bxp(list(stats = c(29, 36.5, 39.5, 43.5, 50, 32, 48.5, 55, 61.5, : 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/2hqke1355855870.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/3m5w31355855870.tab") > > try(system("convert tmp/1bvls1355855870.ps tmp/1bvls1355855870.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.899 0.292 1.170