R version 3.2.5 (2016-04-14) -- "Very, Very Secure Dishes" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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 <- c(74787,49019,56601,47637,49806,50499,42092,39062,44382,43635,41082,17244,70170,43949,52333,41032,47758,76116,30917,32996,31951,26775,30268,18214,47957,31901,35559,30408,30083,35043,30475,28309,31394,36313,40357,38918,44368,33298,29366,28282,30943,32699,29764,25524,29807,35112,32192,36214,47639,33421,28642,26996,27757,36839,33821,30839,35032,38821,40347,68799) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Standard Deviation Plot (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_sdplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 5 > arr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + if (j == par1) j = 0 + } > ari [1] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 74787 70170 47957 44368 47639 NA [2,] 49019 43949 31901 33298 33421 NA [3,] 56601 52333 35559 29366 28642 NA [4,] 47637 41032 30408 28282 26996 NA [5,] 49806 47758 30083 30943 27757 NA [6,] 50499 76116 35043 32699 36839 NA [7,] 42092 30917 30475 29764 33821 NA [8,] 39062 32996 28309 25524 30839 NA [9,] 44382 31951 31394 29807 35032 NA [10,] 43635 26775 36313 35112 38821 NA [11,] 41082 30268 40357 32192 40347 NA [12,] 17244 18214 38918 36214 68799 NA > arr.sd <- array(NA,dim=par1) > arr.range <- array(NA,dim=par1) > arr.iqr <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.sd[j] <- sqrt(var(arr[j,],na.rm=TRUE)) + arr.range[j] <- max(arr[j,],na.rm=TRUE) - min(arr[j,],na.rm=TRUE) + arr.iqr[j] <- quantile(arr[j,],0.75,na.rm=TRUE) - quantile(arr[j,],0.25,na.rm=TRUE) + } > overall.sd <- sqrt(var(x)) > overall.range <- max(x) - min(x) > overall.iqr <- quantile(x,0.75) - quantile(x,0.25) > postscript(file="/var/wessaorg/rcomp/tmp/1fcwv1462274170.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.sd,type='b',ylab='S.D.',main='Standard Deviation Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.sd,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2lyj51462274170.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.range,type='b',ylab='range',main='Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.range,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3ja561462274170.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.iqr,type='b',ylab='IQR',main='Interquartile Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.iqr,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4opw21462274170.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(arr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 44368 31901 28642 26996 27757 32699 29764 25524 29807 35112 30268 17244 [2,] 47639 33298 29366 28282 30083 35043 30475 28309 31394 35112 32192 18214 [3,] 47957 33421 35559 30408 30943 36839 30917 30839 31951 36313 40347 36214 [4,] 70170 43949 52333 41032 47758 50499 33821 32996 35032 38821 40357 38918 [5,] 74787 49019 56601 47637 49806 50499 33821 39062 35032 43635 41082 68799 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 32036.65 25895.03 19330.58 21398.88 18453.89 25917.83 28552.72 27527.18 [2,] 63877.35 40946.97 51787.42 39417.12 43432.11 47760.17 33281.28 34150.82 [,9] [,10] [,11] [,12] [1,] 29380.4 33692.23 34577.63 21584.61 [2,] 34521.6 38933.77 46116.37 50843.39 $out [1] 76116 42092 44382 26775 $group [1] 6 7 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(44368, 47639, 47957, 70170, 74787, 31901, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5vj1r1462274170.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(arr) > names(z) <- c(1:np) > (boxplot(z,notch=TRUE,col='grey',xlab='Block Index',ylab='Value',main='Notched Box Plots - Sequential Blocks')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [1,] 39062.0 18214.0 28309.0 25524.0 26996.0 NA [2,] 41587.0 30592.5 30441.5 29565.0 29740.5 NA [3,] 46009.5 37014.0 33472.0 31567.5 34426.5 NA [4,] 50152.5 50045.5 37615.5 34205.0 39584.0 NA [5,] 56601.0 76116.0 47957.0 36214.0 47639.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 42102.72 28141.36 30199.89 29451.16 29936.81 NA [2,] 49916.28 45886.64 36744.11 33683.84 38916.19 NA $out [1] 74787 17244 44368 68799 $group [1] 1 1 4 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(39062, 41587, 46009.5, 50152.5, 56601, 18214, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6f62t1462274170.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.sd,arr.range,arr.iqr)) > names(z) <- list('S.D.','Range','IQR') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Variability',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 5090.888 10814.0 3346.0 [2,] 5508.144 14056.5 4198.0 [3,] 8361.066 18879.5 11700.5 [4,] 13712.303 29189.0 19189.5 [5,] 20930.776 51555.0 22967.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4619.094 11977.47 4862.776 [2,] 12103.038 25781.53 18538.224 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(5090.88800701803, 5508.14433218035, 8361.06571633056, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1fcwv1462274170.ps tmp/1fcwv1462274170.png",intern=TRUE)) character(0) > try(system("convert tmp/2lyj51462274170.ps tmp/2lyj51462274170.png",intern=TRUE)) character(0) > try(system("convert tmp/3ja561462274170.ps tmp/3ja561462274170.png",intern=TRUE)) character(0) > try(system("convert tmp/4opw21462274170.ps tmp/4opw21462274170.png",intern=TRUE)) character(0) > try(system("convert tmp/5vj1r1462274170.ps tmp/5vj1r1462274170.png",intern=TRUE)) character(0) > try(system("convert tmp/6f62t1462274170.ps tmp/6f62t1462274170.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.096 0.375 2.493