R version 3.0.1 (2013-05-16) -- "Good Sport" 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 <- c(1165010 + ,1160665 + ,1156265 + ,1147162.5 + ,1237238.75 + ,1232481.25 + ,1165010 + ,1120157.5 + ,1124488.75 + ,1124488.75 + ,1129328.75 + ,1138005 + ,1151507.5 + ,1151507.5 + ,1142831.25 + ,1120157.5 + ,1237238.75 + ,1255086.25 + ,1228136.25 + ,1165010 + ,1192015 + ,1151507.5 + ,1169781.25 + ,1178512.5 + ,1187615 + ,1165010 + ,1169781.25 + ,1138005 + ,1237238.75 + ,1268588.75 + ,1241638.75 + ,1192015 + ,1245983.75 + ,1187615 + ,1241638.75 + ,1237238.75 + ,1250755 + ,1201131.25 + ,1255086.25 + ,1250755 + ,1331715 + ,1313441.25 + ,1241638.75 + ,1205462.5 + ,1255086.25 + ,1187615 + ,1237238.75 + ,1245983.75 + ,1264257.5 + ,1223805 + ,1245983.75 + ,1259486.25 + ,1309110 + ,1268588.75 + ,1214633.75 + ,1156265 + ,1210288.75 + ,1061788.75 + ,1133660 + ,1174112.5 + ,1214633.75 + ,1156265 + ,1156265 + ,1156265 + ,1187615 + ,1142831.25 + ,1084036.25 + ,1034838.75 + ,1070533.75 + ,931205 + ,1016578.75 + ,1066188.75 + ,1075305 + ,1025681.25 + ,1030012.5 + ,1016578.75 + ,1061788.75 + ,1030012.5 + ,967381.25 + ,922102.5 + ,998662.5 + ,832383.75 + ,940362.5 + ,989560 + ,989560 + ,931205 + ,877236.25 + ,872905 + ,922102.5 + ,877236.25 + ,791931.25 + ,733136.25 + ,796276.25 + ,647831.25 + ,782760 + ,854562.5 + ,877236.25 + ,827626.25 + ,764926.25 + ,809778.75 + ,827626.25 + ,814110 + ,679126.25 + ,616481.25 + ,661278.75 + ,526350 + ,665678.75 + ,715302.5 + ,755755 + ,688283.75 + ,625157.5 + ,661278.75 + ,679126.25 + ,643431.25 + ,508502.5 + ,449707.5 + ,503676.25 + ,355231.25 + ,517178.75 + ,616481.25) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1165010 1151508 1187615 1250755 1264258 1214634 1075305.0 989560.0 [2,] 1160665 1151508 1165010 1201131 1223805 1156265 1025681.2 931205.0 [3,] 1156265 1142831 1169781 1255086 1245984 1156265 1030012.5 877236.2 [4,] 1147162 1120158 1138005 1250755 1259486 1156265 1016578.8 872905.0 [5,] 1237239 1237239 1237239 1331715 1309110 1187615 1061788.8 922102.5 [6,] 1232481 1255086 1268589 1313441 1268589 1142831 1030012.5 877236.2 [7,] 1165010 1228136 1241639 1241639 1214634 1084036 967381.2 791931.2 [8,] 1120158 1165010 1192015 1205462 1156265 1034839 922102.5 733136.2 [9,] 1124489 1192015 1245984 1255086 1210289 1070534 998662.5 796276.2 [10,] 1124489 1151508 1187615 1187615 1061789 931205 832383.8 647831.2 [11,] 1129329 1169781 1241639 1237239 1133660 1016579 940362.5 782760.0 [12,] 1138005 1178512 1237239 1245984 1174112 1066189 989560.0 854562.5 [,9] [,10] [,11] [1,] 877236.2 755755.0 NA [2,] 827626.2 688283.8 NA [3,] 764926.2 625157.5 NA [4,] 809778.8 661278.8 NA [5,] 827626.2 679126.2 NA [6,] 814110.0 643431.2 NA [7,] 679126.2 508502.5 NA [8,] 616481.2 449707.5 NA [9,] 661278.8 503676.2 NA [10,] 526350.0 355231.2 NA [11,] 665678.8 517178.8 NA [12,] 715302.5 616481.2 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/fisher/rcomp/tmp/12s181377009321.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/fisher/rcomp/tmp/2na5w1377009321.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/fisher/rcomp/tmp/3t7bs1377009321.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/fisher/rcomp/tmp/4xglz1377009321.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] [1,] 755755 688283.8 625157.5 661278.8 679126.2 643431.2 508502.5 [2,] 989560 931205.0 877236.2 872905.0 922102.5 877236.2 791931.2 [3,] 1158259 1153886.2 1149548.1 1129081.2 1212426.9 1187656.2 1124523.1 [4,] 1214634 1165010.0 1169781.2 1156265.0 1237238.8 1268588.8 1228136.2 [5,] 1264258 1223805.0 1255086.2 1259486.2 1331715.0 1313441.2 1241638.8 [,8] [,9] [,10] [,11] [,12] [1,] 449707.5 503676.2 355231.2 517178.8 616481.2 [2,] 733136.2 796276.2 647831.2 782760.0 854562.5 [3,] 1077498.1 1097511.2 996496.9 1072953.8 1102096.9 [4,] 1165010.0 1210288.8 1151507.5 1169781.2 1178512.5 [5,] 1205462.5 1255086.2 1187615.0 1241638.8 1245983.8 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1045803 1037068 1003381 987503.3 1054972 992120.9 906577.7 861716.8 [2,] 1270715 1270705 1295715 1270659.2 1369882 1383191.6 1342468.5 1293279.5 [,9] [,10] [,11] [,12] [1,] 890654.1 744840.1 879582.5 940238.5 [2,] 1304368.4 1248153.6 1266325.0 1263955.2 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(755755, 989560, 1158258.75, 1214633.75, 1264257.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/5q5ui1377009321.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] [,7] [,8] [1,] 1120158 1120158 1138005 1187615 1061789 931205 922102.5 647831.2 [2,] 1126909 1151508 1178698 1221351 1165189 1050514 953871.9 787345.6 [3,] 1151714 1167396 1214627 1248369 1219219 1113434 1007620.6 863733.8 [4,] 1165010 1210076 1241639 1255086 1261872 1156265 1030012.5 899669.4 [5,] 1165010 1255086 1268589 1255086 1309110 1214634 1075305.0 989560.0 [,9] [,10] [,11] [1,] 526350.0 355231.2 NA [2,] 663478.8 506089.4 NA [3,] 740114.4 620819.4 NA [4,] 820868.1 670202.5 NA [5,] 877236.2 755755.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1134336 1140682 1185919 1232982 1175122 1065200 972892.4 812502.1 [2,] 1169092 1194109 1243335 1263756 1263317 1161668 1042348.9 914965.4 [,9] [,10] [,11] [1,] 668328.0 545966.3 NA [2,] 811900.7 695672.5 NA $out [1] 1237238.8 1232481.2 1331715.0 1313441.2 832383.8 $group [1] 1 1 4 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(1120157.5, 1126908.75, 1151713.75, 1165010, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/60kht1377009321.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,] 169270.3 508502.5 196882.8 [2,] 207462.9 613855.0 248068.9 [3,] 227895.8 661299.4 313845.5 [4,] 265198.6 742273.1 370646.7 [5,] 300146.3 832383.8 450783.4 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 201562.2 602727.0 257936.9 [2,] 254229.4 719871.7 369754.0 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(169270.320130299, 207462.932865241, 227895.772926104, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/12s181377009321.ps tmp/12s181377009321.png",intern=TRUE)) character(0) > try(system("convert tmp/2na5w1377009321.ps tmp/2na5w1377009321.png",intern=TRUE)) character(0) > try(system("convert tmp/3t7bs1377009321.ps tmp/3t7bs1377009321.png",intern=TRUE)) character(0) > try(system("convert tmp/4xglz1377009321.ps tmp/4xglz1377009321.png",intern=TRUE)) character(0) > try(system("convert tmp/5q5ui1377009321.ps tmp/5q5ui1377009321.png",intern=TRUE)) character(0) > try(system("convert tmp/60kht1377009321.ps tmp/60kht1377009321.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.288 0.863 4.126