R version 3.2.4 Revised (2016-03-16 r70336) -- "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(13566.7,13941.5,14964.1,14086,13505.1,15300.4,14725.2,12484.9,16082.6,15915.8,15916.1,15713,14746,15253.2,18384.3,16848.5,16485.5,19257.1,17093.4,15700.1,19124.3,18640.8,18439.2,17106.3,18347.7,19372.7,22263.8,19422.9,21268.6,20310,19256,17535.9,19857.4,19628.4,19727.5,18112.2,18889.3,20516.1,22317,19768.8,20015.8,20260.5,19434.3,17910,19134.4,20880.1,19680,17493.4,19087.8,19064.6,21191,20503.9,20364.1,19860.4,20924.1,17018.8,20607.4,21500.2,19868.3,18801.9,19787.5,19936.2,21047.6,21034.4,20132.8,20725.3,20827.8,16992.3,21818.2,21841.4,19252.2,17933.7) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 13566.7 14746.0 18347.7 18889.3 19087.8 19787.5 NA [2,] 13941.5 15253.2 19372.7 20516.1 19064.6 19936.2 NA [3,] 14964.1 18384.3 22263.8 22317.0 21191.0 21047.6 NA [4,] 14086.0 16848.5 19422.9 19768.8 20503.9 21034.4 NA [5,] 13505.1 16485.5 21268.6 20015.8 20364.1 20132.8 NA [6,] 15300.4 19257.1 20310.0 20260.5 19860.4 20725.3 NA [7,] 14725.2 17093.4 19256.0 19434.3 20924.1 20827.8 NA [8,] 12484.9 15700.1 17535.9 17910.0 17018.8 16992.3 NA [9,] 16082.6 19124.3 19857.4 19134.4 20607.4 21818.2 NA [10,] 15915.8 18640.8 19628.4 20880.1 21500.2 21841.4 NA [11,] 15916.1 18439.2 19727.5 19680.0 19868.3 19252.2 NA [12,] 15713.0 17106.3 18112.2 17493.4 18801.9 17933.7 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/1j6qo1458661010.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/262pb1458661010.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/3jas31458661010.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/4oghp1458661010.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,] 13566.7 13941.50 14964.1 14086.00 13505.1 19257.10 14725.20 15700.10 [2,] 14746.0 15253.20 18384.3 16848.50 16485.5 19257.10 17093.40 15700.10 [3,] 18618.5 19218.65 21119.3 19595.85 20074.3 20060.45 19345.15 17005.55 [4,] 19087.8 19936.20 22263.8 20503.90 20364.1 20310.00 20827.80 17535.90 [5,] 19787.5 20516.10 22317.0 21034.40 21268.6 20725.30 20924.10 17910.00 [,9] [,10] [,11] [,12] [1,] 19124.3 15915.80 18439.2 15713.00 [2,] 19124.3 18640.80 18439.2 17106.30 [3,] 19495.9 20254.25 19466.1 17713.55 [4,] 20607.4 21500.20 19727.5 18112.20 [5,] 21818.2 21841.40 19868.3 18801.90 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 15817.9 16197.96 18616.9 17238.0 17572.48 19381.3 16936.34 15821.4 [2,] 21419.1 22239.34 23621.7 21953.7 22576.12 20739.6 21753.96 18189.7 [,9] [,10] [,11] [,12] [1,] 18539.25 18409.84 18635.1 17064.71 [2,] 20452.55 22098.66 20297.1 18362.39 $out [1] 15300.4 12484.9 16082.6 15916.1 $group [1] 6 8 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(13566.7, 14746, 18618.5, 19087.8, 19787.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5n9m41458661010.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] [1,] 12484.90 14746.00 17535.90 17493.40 17018.80 17933.70 NA [2,] 13754.10 16092.80 18801.85 19011.85 19076.20 19519.85 NA [3,] 14844.65 17099.85 19525.65 19724.40 20116.20 20429.05 NA [4,] 15814.40 18540.00 20083.70 20388.30 20765.75 21041.00 NA [5,] 16082.60 19257.10 21268.60 22317.00 21500.20 21841.40 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 13904.93 15983.67 18940.99 19096.59 19345.58 19735.24 NA [2,] 15784.37 18216.03 20110.31 20352.21 20886.82 21122.86 NA $out [1] 22263.8 16992.3 $group [1] 3 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(12484.9, 13754.1, 14844.65, 15814.4, 16082.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6mys01458661010.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,] 1058.484 3952.20 864.500 [2,] 1966.523 5425.00 1183.125 [3,] 2308.342 6062.25 2642.750 [4,] 2685.799 6761.50 2941.837 [5,] 3000.388 7763.50 3589.275 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1980.275 5452.663 1840.589 [2,] 2636.408 6671.837 3444.911 $out [1] 3088.9 $group [1] 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(1058.484484062, 1966.52332928436, 2308.34151893721, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1j6qo1458661010.ps tmp/1j6qo1458661010.png",intern=TRUE)) character(0) > try(system("convert tmp/262pb1458661010.ps tmp/262pb1458661010.png",intern=TRUE)) character(0) > try(system("convert tmp/3jas31458661010.ps tmp/3jas31458661010.png",intern=TRUE)) character(0) > try(system("convert tmp/4oghp1458661010.ps tmp/4oghp1458661010.png",intern=TRUE)) character(0) > try(system("convert tmp/5n9m41458661010.ps tmp/5n9m41458661010.png",intern=TRUE)) character(0) > try(system("convert tmp/6mys01458661010.ps tmp/6mys01458661010.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.202 0.469 2.689