R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" 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(7263.63 + ,7135.88 + ,7008.00 + ,6752.38 + ,9339.00 + ,9211.13 + ,7263.63 + ,5970.38 + ,6098.13 + ,6098.13 + ,6226.00 + ,6495.50 + ,5714.75 + ,4932.75 + ,4292.38 + ,4292.38 + ,6752.38 + ,7008.00 + ,5060.50 + ,2857.38 + ,4022.88 + ,4022.88 + ,4932.75 + ,5457.88 + ,5330.00 + ,4022.88 + ,4677.13 + ,4420.25 + ,6623.38 + ,6098.13 + ,4022.88 + ,2472.75 + ,3895.00 + ,4292.38 + ,4677.13 + ,5188.38 + ,4150.63 + ,3254.75 + ,3639.50 + ,3767.25 + ,7135.88 + ,7135.88 + ,5188.38 + ,4932.75 + ,5714.75 + ,5330.00 + ,6367.75 + ,7661.00 + ,7917.88 + ,6098.13 + ,5585.63 + ,5060.50 + ,8570.88 + ,8827.75 + ,8173.50 + ,8827.75 + ,8698.63 + ,7661.00 + ,8827.75 + ,10121.00 + ,10646.13 + ,9083.38 + ,8045.63 + ,8827.75 + ,12196.25 + ,13234.00 + ,12978.38 + ,13489.50 + ,13361.75 + ,12068.50 + ,14271.63 + ,14796.75 + ,15564.88 + ,13234.00 + ,12324.13 + ,13361.75 + ,15834.38 + ,18037.50 + ,17512.38 + ,17512.38 + ,17769.25 + ,16872.00 + ,19204.25 + ,19204.25 + ,18806.88 + ,16602.50 + ,16999.88 + ,17256.75 + ,18947.38 + ,21150.50 + ,19587.63 + ,20369.75 + ,19715.50 + ,19332.00 + ,22317.25 + ,21663.00 + ,20753.13 + ,19459.88 + ,20753.13 + ,21407.38 + ,22188.13 + ,23225.75 + ,22188.13 + ,22828.50 + ,22047.63 + ,21919.88 + ,25160.63 + ,25430.13 + ,24392.50 + ,22572.88 + ,24123.00 + ,24776.00 + ,25558.00 + ,26723.50 + ,25558.00 + ,26467.88 + ,26070.50 + ,24648.13 + ,27633.25 + ,27633.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,] 7263.63 5714.75 5330.00 4150.63 7917.88 10646.13 15564.88 18806.88 [2,] 7135.88 4932.75 4022.88 3254.75 6098.13 9083.38 13234.00 16602.50 [3,] 7008.00 4292.38 4677.13 3639.50 5585.63 8045.63 12324.13 16999.88 [4,] 6752.38 4292.38 4420.25 3767.25 5060.50 8827.75 13361.75 17256.75 [5,] 9339.00 6752.38 6623.38 7135.88 8570.88 12196.25 15834.38 18947.38 [6,] 9211.13 7008.00 6098.13 7135.88 8827.75 13234.00 18037.50 21150.50 [7,] 7263.63 5060.50 4022.88 5188.38 8173.50 12978.38 17512.38 19587.63 [8,] 5970.38 2857.38 2472.75 4932.75 8827.75 13489.50 17512.38 20369.75 [9,] 6098.13 4022.88 3895.00 5714.75 8698.63 13361.75 17769.25 19715.50 [10,] 6098.13 4022.88 4292.38 5330.00 7661.00 12068.50 16872.00 19332.00 [11,] 6226.00 4932.75 4677.13 6367.75 8827.75 14271.63 19204.25 22317.25 [12,] 6495.50 5457.88 5188.38 7661.00 10121.00 14796.75 19204.25 21663.00 [,9] [,10] [,11] [1,] 20753.13 24392.50 NA [2,] 19459.88 22572.88 NA [3,] 20753.13 24123.00 NA [4,] 21407.38 24776.00 NA [5,] 22188.13 25558.00 NA [6,] 23225.75 26723.50 NA [7,] 22188.13 25558.00 NA [8,] 22828.50 26467.88 NA [9,] 22047.63 26070.50 NA [10,] 21919.88 24648.13 NA [11,] 25160.63 27633.25 NA [12,] 25430.13 27633.25 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/10f9u1470817351.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/2ivo51470817351.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/3fk6y1470817351.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/4hsgo1470817351.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] [1,] 4150.630 3254.75 3639.500 3767.250 6623.38 6098.13 4022.88 2472.75 [2,] 5714.750 4932.75 4677.130 4420.250 7135.88 7135.88 5188.38 4932.75 [3,] 9282.005 8109.63 7526.815 7790.065 10767.62 11222.56 10575.94 11158.62 [4,] 18806.880 16602.50 16999.880 17256.750 18947.38 21150.50 19587.63 20369.75 [5,] 24392.500 22572.88 24123.000 24776.000 25558.00 26723.50 25558.00 26467.88 [,9] [,10] [,11] [,12] [1,] 3895.00 4022.88 4677.13 5188.38 [2,] 5714.75 5330.00 6226.00 6495.50 [3,] 11030.19 9864.75 11549.69 12458.88 [4,] 19715.50 19332.00 22317.25 21663.00 [5,] 26070.50 24648.13 27633.25 27633.25 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2740.655 2278.958 1369.878 1376.438 4866.129 4220.302 3381.501 [2,] 15823.355 13940.302 13683.752 14203.692 16669.121 18224.828 17770.379 [,8] [,9] [,10] [,11] [,12] [1,] 3445.684 4034.857 2868.793 3509.86 4880.587 [2,] 18871.566 18025.523 16860.707 19589.52 20037.163 $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(4150.63, 5714.75, 9282.005, 18806.88, 24392.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5aoit1470817351.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,] 5970.380 2857.380 2472.75 3254.750 5060.500 8045.630 12324.13 16602.50 [2,] 6162.065 4157.630 4022.88 3958.940 6879.565 9864.755 14463.31 18031.82 [3,] 6880.190 4932.750 4548.69 5259.190 8372.190 12587.315 17192.19 19459.82 [4,] 7263.630 5586.315 5259.19 6751.815 8827.750 13425.625 17903.38 20760.12 [5,] 7263.630 7008.000 6623.38 7661.000 10121.000 14796.750 19204.25 22317.25 [,9] [,10] [,11] [1,] 19459.88 22572.88 NA [2,] 21080.26 24520.32 NA [3,] 22117.88 25558.00 NA [4,] 23027.12 26595.69 NA [5,] 25430.13 27633.25 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 6377.759 4281.117 3984.801 3985.341 7483.61 10963.18 15623.16 18215.41 [2,] 7382.621 5584.383 5112.579 6533.039 9260.77 14211.45 18761.22 20704.22 [,9] [,10] [,11] [1,] 21229.90 24611.41 NA [2,] 23005.86 26504.59 NA $out [1] 9339.00 9211.13 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(5970.38, 6162.065, 6880.19, 7263.63, 7263.63, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6856u1470817351.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,] 6901.655 18934.62 10536.28 [2,] 7352.938 20362.68 11314.69 [3,] 7810.124 20817.06 13004.18 [4,] 8385.631 22310.18 13839.89 [5,] 8952.434 23995.13 15277.56 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 7339.106 19928.79 11852.42 [2,] 8281.143 21705.33 14155.95 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(6901.65481599087, 7352.93808740481, 7810.1243658883, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/10f9u1470817351.ps tmp/10f9u1470817351.png",intern=TRUE)) character(0) > try(system("convert tmp/2ivo51470817351.ps tmp/2ivo51470817351.png",intern=TRUE)) character(0) > try(system("convert tmp/3fk6y1470817351.ps tmp/3fk6y1470817351.png",intern=TRUE)) character(0) > try(system("convert tmp/4hsgo1470817351.ps tmp/4hsgo1470817351.png",intern=TRUE)) character(0) > try(system("convert tmp/5aoit1470817351.ps tmp/5aoit1470817351.png",intern=TRUE)) character(0) > try(system("convert tmp/6856u1470817351.ps tmp/6856u1470817351.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.529 0.279 2.857