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(102 + ,156 + ,99 + ,109 + ,97 + ,104 + ,82 + ,98 + ,77 + ,78 + ,65 + ,77 + ,64 + ,73 + ,62 + ,71 + ,62 + ,67 + ,62 + ,64 + ,61 + ,62 + ,59 + ,61 + ,57 + ,58 + ,56 + ,58 + ,54 + ,56 + ,54 + ,56 + ,53 + ,52 + ,52 + ,51 + ,51 + ,51 + ,51 + ,50 + ,51 + ,49 + ,50 + ,49 + ,50 + ,48 + ,50 + ,47 + ,49 + ,47 + ,49 + ,46 + ,49 + ,45 + ,48 + ,45 + ,48 + ,45 + ,47 + ,45 + ,47 + ,44 + ,46 + ,44 + ,46 + ,44 + ,45 + ,43 + ,45 + ,43 + ,45 + ,42 + ,44 + ,41 + ,43 + ,41 + ,42 + ,40 + ,42 + ,39 + ,42 + ,39 + ,42 + ,39 + ,42 + ,39 + ,42 + ,39 + ,41 + ,39 + ,41 + ,39 + ,41 + ,38 + ,41 + ,38 + ,41 + ,38 + ,41 + ,38 + ,41 + ,37 + ,40 + ,37 + ,40 + ,37 + ,40 + ,36 + ,40 + ,36 + ,40 + ,36 + ,39 + ,36 + ,39 + ,36 + ,38 + ,36 + ,38 + ,35 + ,36 + ,35 + ,36 + ,34 + ,35 + ,34 + ,35 + ,34 + ,35 + ,34 + ,35 + ,34 + ,34 + ,33 + ,34 + ,33 + ,34 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,33 + ,32 + ,32 + ,32 + ,32 + ,32 + ,32 + ,31 + ,32 + ,31 + ,32 + ,30 + ,31 + ,30 + ,31 + ,30 + ,31 + ,30 + ,30 + ,29 + ,30 + ,28 + ,29 + ,28 + ,29 + ,27 + ,29 + ,27 + ,28 + ,27 + ,28 + ,26 + ,28 + ,25 + ,28 + ,25 + ,28 + ,25 + ,28 + ,24 + ,27 + ,24 + ,27 + ,23 + ,27 + ,23 + ,26 + ,23 + ,26 + ,23 + ,26 + ,23 + ,26 + ,22 + ,25 + ,22 + ,25 + ,22 + ,24 + ,22 + ,24 + ,20 + ,24 + ,19 + ,24 + ,19 + ,24 + ,17 + ,24 + ,17 + ,24 + ,16 + ,23 + ,16 + ,23 + ,5 + ,23 + ,4 + ,23 + ,3 + ,23 + ,3 + ,23 + ,1 + ,23 + ,NA + ,22 + ,NA + ,22 + ,NA + ,21 + ,NA + ,21 + ,NA + ,21 + ,NA + ,21 + ,NA + ,20 + ,NA + ,20 + ,NA + ,20 + ,NA + ,20 + ,NA + ,20 + ,NA + ,19 + ,NA + ,19 + ,NA + ,19 + ,NA + ,18 + ,NA + ,18 + ,NA + ,18 + ,NA + ,18 + ,NA + ,18 + ,NA + ,17 + ,NA + ,17 + ,NA + ,17 + ,NA + ,16 + ,NA + ,16 + ,NA + ,15 + ,NA + ,15 + ,NA + ,15 + ,NA + ,15 + ,NA + ,14 + ,NA + ,13 + ,NA + ,13 + ,NA + ,12 + ,NA + ,11 + ,NA + ,11 + ,NA + ,10 + ,NA + ,10 + ,NA + ,10 + ,NA + ,10 + ,NA + ,9 + ,NA + ,8 + ,NA + ,8 + ,NA + ,8 + ,NA + ,7 + ,NA + ,7 + ,NA + ,6 + ,NA + ,4 + ,NA + ,4 + ,NA + ,2 + ,NA + ,1 + ,NA + ,1 + ,NA + ,1 + ,NA + ,0 + ,NA + ,0 + ,NA + ,0) + ,dim=c(2 + ,168) + ,dimnames=list(c('hours_UK' + ,'hours_B') + ,1:168)) > y <- array(NA,dim=c(2,168),dimnames=list(c('hours_UK','hours_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/fisher/rcomp/tmp/1g38x1353927984.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 0 [2,] 27 19 [3,] 39 29 [4,] 48 39 [5,] 77 67 $n [1] 114 168 $conf [,1] [,2] [1,] 35.89241 26.56201 [2,] 42.10759 31.43799 $out [1] 102 99 97 82 156 109 104 98 78 77 73 71 $group [1] 1 1 1 1 2 2 2 2 2 2 2 2 $names [1] "hours_UK" "hours_B" > 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/26csc1353927984.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/35wdq1353927984.tab") > > try(system("convert tmp/1g38x1353927984.ps tmp/1g38x1353927984.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.893 0.225 1.097