R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(1 + ,80 + ,2 + ,80 + ,3 + ,80 + ,4 + ,80 + ,5 + ,80 + ,6 + ,80 + ,7 + ,80 + ,8 + ,80 + ,9 + ,80 + ,10 + ,80 + ,11 + ,80 + ,12 + ,80 + ,13 + ,80 + ,14 + ,80 + ,15 + ,85 + ,16 + ,85 + ,17 + ,85 + ,18 + ,85 + ,19 + ,85 + ,20 + ,85 + ,21 + ,85 + ,22 + ,85 + ,23 + ,85 + ,24 + ,85 + ,25 + ,85 + ,26 + ,85 + ,27 + ,85 + ,28 + ,85 + ,29 + ,85 + ,30 + ,85 + ,31 + ,85 + ,32 + ,85 + ,33 + ,85 + ,34 + ,85 + ,35 + ,85 + ,36 + ,85 + ,37 + ,90 + ,38 + ,90 + ,39 + ,90 + ,40 + ,90 + ,41 + ,90 + ,42 + ,90 + ,43 + ,90 + ,44 + ,90 + ,45 + ,90 + ,46 + ,90 + ,47 + ,90 + ,48 + ,90 + ,49 + ,90 + ,50 + ,90 + ,51 + ,90 + ,52 + ,90 + ,53 + ,90 + ,54 + ,90 + ,55 + ,90 + ,56 + ,90 + ,57 + ,90 + ,58 + ,90 + ,59 + ,90 + ,60 + ,90 + ,61 + ,90 + ,62 + ,90 + ,63 + ,90 + ,64 + ,90 + ,65 + ,90 + ,66 + ,90 + ,67 + ,90 + ,68 + ,90 + ,69 + ,90 + ,70 + ,90 + ,71 + ,90 + ,72 + ,90 + ,73 + ,90 + ,74 + ,90 + ,75 + ,90 + ,76 + ,90 + ,77 + ,90 + ,78 + ,90 + ,79 + ,90 + ,80 + ,90 + ,81 + ,90 + ,82 + ,90 + ,83 + ,90 + ,84 + ,90 + ,85 + ,90 + ,86 + ,90 + ,87 + ,90 + ,88 + ,90 + ,89 + ,90 + ,90 + ,90 + ,91 + ,90 + ,92 + ,90 + ,93 + ,90 + ,94 + ,90 + ,95 + ,90 + ,96 + ,90 + ,97 + ,90 + ,98 + ,90 + ,99 + ,90 + ,100 + ,90 + ,101 + ,90 + ,102 + ,90 + ,103 + ,100 + ,104 + ,100 + ,105 + ,100 + ,106 + ,100 + ,107 + ,100 + ,108 + ,100 + ,109 + ,100 + ,110 + ,100 + ,111 + ,100 + ,112 + ,100 + ,113 + ,100 + ,114 + ,100 + ,115 + ,100 + ,116 + ,100 + ,117 + ,100 + ,118 + ,110 + ,119 + ,110 + ,120 + ,110 + ,121 + ,110 + ,122 + ,110 + ,123 + ,110 + ,124 + ,110 + ,125 + ,110 + ,126 + ,110 + ,127 + ,110 + ,128 + ,110 + ,129 + ,110 + ,130 + ,110 + ,131 + ,120 + ,132 + ,120 + ,133 + ,120 + ,134 + ,120 + ,135 + ,120 + ,136 + ,120 + ,137 + ,120 + ,138 + ,120 + ,139 + ,120 + ,140 + ,120 + ,141 + ,120 + ,142 + ,120 + ,143 + ,120 + ,144 + ,120 + ,145 + ,120 + ,146 + ,120 + ,147 + ,120 + ,148 + ,120 + ,149 + ,120 + ,150 + ,120 + ,151 + ,120 + ,152 + ,200 + ,153 + ,210) + ,dim=c(2 + ,153) + ,dimnames=list(c('A' + ,'B') + ,1:153)) > y <- array(NA,dim=c(2,153),dimnames=list(c('A','B'),1:153)) > 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/1wnf01392571315.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,] 1 80 [2,] 39 90 [3,] 77 90 [4,] 115 100 [5,] 153 110 $n [1] 153 153 $conf [,1] [,2] [1,] 67.29211 88.72265 [2,] 86.70789 91.27735 $out [1] 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 [20] 120 120 200 210 $group [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 $names [1] "A" "B" Warning message: In bxp(list(stats = c(1, 39, 77, 115, 153, 80, 90, 90, 100, 110), : 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/2dxgb1392571315.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/3ilpa1392571315.tab") > > try(system("convert tmp/1wnf01392571315.ps tmp/1wnf01392571315.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.465 0.382 1.829