R version 3.2.4 (2016-03-10) -- "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(98.72,98.67,98.82,99.39,99.33,99.22,99.05,98.83,98.84,98.89,98.8,99.4,98.89,98.85,98.69,98.48,98.39,98.35,98.26,98.06,98.14,98.17,98.41,98.64,99.25,99.61,100.28,100.31,100.55,100.45,100.78,100.68,101.69,98.09,99.13,99.18,96.22,96.11,96,95.96,97.95,98.43,98.32,97.45,96.42,95.36,95.1,95.54,94.07,93.48,92.86,90.98,91.45,91.16,90.71,90.31,89.78,91.02,90.77,90.69) > 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,] 98.72 98.89 99.25 96.22 94.07 NA [2,] 98.67 98.85 99.61 96.11 93.48 NA [3,] 98.82 98.69 100.28 96.00 92.86 NA [4,] 99.39 98.48 100.31 95.96 90.98 NA [5,] 99.33 98.39 100.55 97.95 91.45 NA [6,] 99.22 98.35 100.45 98.43 91.16 NA [7,] 99.05 98.26 100.78 98.32 90.71 NA [8,] 98.83 98.06 100.68 97.45 90.31 NA [9,] 98.84 98.14 101.69 96.42 89.78 NA [10,] 98.89 98.17 98.09 95.36 91.02 NA [11,] 98.80 98.41 99.13 95.10 90.77 NA [12,] 99.40 98.64 99.18 95.54 90.69 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/1n4tf1458394610.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/2nmfq1458394610.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/3dwg61458394610.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/4f1yk1458394610.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] [1,] 94.07 93.48 92.86 90.98 97.95 98.35 98.26 97.45 96.42 95.36 90.77 [2,] 96.22 96.11 96.00 95.96 97.95 98.35 98.26 97.45 96.42 95.36 95.10 [3,] 98.72 98.67 98.69 98.48 98.39 98.43 98.32 98.06 98.14 98.09 98.41 [4,] 98.89 98.85 98.82 99.39 99.33 99.22 99.05 98.83 98.84 98.17 98.80 [5,] 99.25 99.61 100.28 100.31 100.55 100.45 99.05 100.68 101.69 98.89 99.13 [,12] [1,] 90.69 [2,] 95.54 [3,] 98.64 [4,] 99.18 [5,] 99.40 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 96.83338 96.73392 96.6974 96.05637 97.4149 97.81526 97.76179 97.0849 [2,] 100.60662 100.60608 100.6826 100.90363 99.3651 99.04474 98.87821 99.0351 [,9] [,10] [,11] [,12] [1,] 96.43003 96.10446 95.79559 96.06799 [2,] 99.84997 100.07554 101.02441 101.21201 $out [1] 91.45 91.16 100.78 90.71 90.31 89.78 91.02 $group [1] 5 6 7 7 8 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(94.07, 96.22, 98.72, 98.89, 99.25, 93.48, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/51byo1458394610.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,] 98.670 98.060 98.090 95.100 89.780 NA [2,] 98.810 98.215 99.215 95.750 90.700 NA [3,] 98.865 98.400 100.295 96.165 91.000 NA [4,] 99.275 98.665 100.615 97.700 92.155 NA [5,] 99.400 98.890 101.690 98.430 94.070 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 98.65291 98.19475 99.65645 95.27559 90.33636 NA [2,] 99.07709 98.60525 100.93355 97.05441 91.66364 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(98.67, 98.81, 98.865, 99.275, 99.4, 98.06, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/68o101458394610.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.228329 5.180 0.790 [2,] 3.092364 7.645 1.380 [3,] 3.606480 8.905 2.705 [4,] 3.818116 9.700 3.125 [5,] 4.448110 11.910 3.700 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3.27546 7.967701 1.909094 [2,] 3.93750 9.842299 3.500906 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(2.22832897032732, 3.09236415052585, 3.60647999029845, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1n4tf1458394610.ps tmp/1n4tf1458394610.png",intern=TRUE)) character(0) > try(system("convert tmp/2nmfq1458394610.ps tmp/2nmfq1458394610.png",intern=TRUE)) character(0) > try(system("convert tmp/3dwg61458394610.ps tmp/3dwg61458394610.png",intern=TRUE)) character(0) > try(system("convert tmp/4f1yk1458394610.ps tmp/4f1yk1458394610.png",intern=TRUE)) character(0) > try(system("convert tmp/51byo1458394610.ps tmp/51byo1458394610.png",intern=TRUE)) character(0) > try(system("convert tmp/68o101458394610.ps tmp/68o101458394610.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.112 0.392 2.523