R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 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(93.55,94.11,94.34,94.38,94.39,94.42,94.42,94.47,94.59,94.63,94.84,94.98,95.19,95.76,96.04,96.08,96.2,96.29,96.3,96.31,96.46,96.66,96.83,97,97.1,97.16,97.31,97.33,97.4,97.4,97.52,97.77,98,98.2,98.48,98.53,98.71,99.03,99.52,99.65,99.94,99.98,100.12,100.17,100.38,100.75,100.84,100.9,100.91,101.15,101.25,101.39,101.4,101.53,101.55,101.58,101.58,101.65,101.7,101.71,101.71,101.73,101.73,101.75,101.84,101.95,101.95,101.98,101.99,102.03,102.11,102.14,102.18,102.2,102.28,102.29,102.32,102.33,102.33,102.36,102.54,102.58,102.79,103.01) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 93.55 95.19 97.10 98.71 100.91 101.71 102.18 NA [2,] 94.11 95.76 97.16 99.03 101.15 101.73 102.20 NA [3,] 94.34 96.04 97.31 99.52 101.25 101.73 102.28 NA [4,] 94.38 96.08 97.33 99.65 101.39 101.75 102.29 NA [5,] 94.39 96.20 97.40 99.94 101.40 101.84 102.32 NA [6,] 94.42 96.29 97.40 99.98 101.53 101.95 102.33 NA [7,] 94.42 96.30 97.52 100.12 101.55 101.95 102.33 NA [8,] 94.47 96.31 97.77 100.17 101.58 101.98 102.36 NA [9,] 94.59 96.46 98.00 100.38 101.58 101.99 102.54 NA [10,] 94.63 96.66 98.20 100.75 101.65 102.03 102.58 NA [11,] 94.84 96.83 98.48 100.84 101.70 102.11 102.79 NA [12,] 94.98 97.00 98.53 100.90 101.71 102.14 103.01 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/1b8i71492784147.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/2eio91492784147.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/3u8yo1492784147.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/4n8gt1492784147.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] [1,] 93.550 94.11 94.340 94.380 94.39 94.420 94.42 94.47 94.590 94.63 [2,] 96.145 96.46 96.675 96.705 96.80 96.845 96.91 97.04 97.230 97.43 [3,] 98.710 99.03 99.520 99.650 99.94 99.980 100.12 100.17 100.380 100.75 [4,] 101.310 101.44 101.490 101.570 101.62 101.740 101.75 101.78 101.785 101.84 [5,] 102.180 102.20 102.280 102.290 102.32 102.330 102.33 102.36 102.540 102.58 [,11] [,12] [1,] 94.840 94.980 [2,] 97.655 97.765 [3,] 100.840 100.900 [4,] 101.905 101.925 [5,] 102.790 103.010 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 95.62555 96.05602 96.64456 96.7447 97.06157 97.05678 97.22963 [2,] 101.79445 102.00398 102.39544 102.5553 102.81843 102.90322 103.01037 [,8] [,9] [,10] [,11] [,12] [1,] 97.33935 97.65983 98.11642 98.30197 98.41572 [2,] 103.00065 103.10017 103.38358 103.37803 103.38428 $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(93.55, 96.145, 98.71, 101.31, 102.18, 94.11, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5srii1492784147.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,] 94.11 95.760 97.10 98.710 100.910 101.71 102.180 NA [2,] 94.36 96.060 97.32 99.585 101.320 101.74 102.285 NA [3,] 94.42 96.295 97.46 100.050 101.540 101.95 102.330 NA [4,] 94.61 96.560 98.10 100.565 101.615 102.01 102.560 NA [5,] 94.98 97.000 98.53 100.900 101.710 102.14 102.790 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 94.30597 96.06695 97.10424 99.60302 101.4054 101.8269 102.2046 NA [2,] 94.53403 96.52305 97.81576 100.49698 101.6746 102.0731 102.4554 NA $out [1] 93.55 95.19 103.01 $group [1] 1 2 7 $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(94.11, 94.36, 94.42, 94.61, 94.98, 95.76, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6a3g91492784147.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,] 2.980703 7.890 4.1600 [2,] 3.048973 7.910 4.4825 [3,] 3.085712 7.945 4.8175 [4,] 3.105375 7.990 4.8800 [5,] 3.152178 8.090 5.1650 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3.059987 7.908511 4.636198 [2,] 3.111437 7.981489 4.998802 $out [1] 3.3445 8.6300 $group [1] 1 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(2.98070301710695, 3.04897327987427, 3.08571218598799, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1b8i71492784147.ps tmp/1b8i71492784147.png",intern=TRUE)) character(0) > try(system("convert tmp/2eio91492784147.ps tmp/2eio91492784147.png",intern=TRUE)) character(0) > try(system("convert tmp/3u8yo1492784147.ps tmp/3u8yo1492784147.png",intern=TRUE)) character(0) > try(system("convert tmp/4n8gt1492784147.ps tmp/4n8gt1492784147.png",intern=TRUE)) character(0) > try(system("convert tmp/5srii1492784147.ps tmp/5srii1492784147.png",intern=TRUE)) character(0) > try(system("convert tmp/6a3g91492784147.ps tmp/6a3g91492784147.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.095 0.495 4.854