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(96.44,96.35,96.4,96.66,96.95,97.14,97.27,97.34,97.42,97.47,97.29,97.36,97.47,97.48,97.84,97.9,97.53,97.61,97.73,97.76,97.87,97.85,98.13,98.21,98.3,98.34,98.38,98.42,98.16,98.18,98.22,98.29,98.45,98.54,98.54,98.78,98.84,99.14,99.2,99.33,98.56,98.65,98.77,98.82,98.9,98.89,98.9,99.07,99.09,99.12,99.03,99,99.21,99.35,99.37,99.39,99.41,99.43,99.6,99.73,99.78,99.8,99.88,99.74,100.15,100.27,100.26,100.36,100.37,100.54,99.8,99.82,99.82,99.82,99.67,99.78,99.44,99.61,99.71,99.71,99.77,99.77,99.89,99.96,100.02,100,100.04,99.99,99.97,99.77,99.93,99.9,100.01,100.08,100.21,100.28,100.48,100.72,100.74,100.88,101.03,101.47,101.46,101.46,101.45,101.74,102.41,102.54,102.67,102.87,102.9,102.88,102.82,102.94,102.97,103.01,103.11,103.21,104.66,104.79) > 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] [,9] [,10] [,11] [1,] 96.44 97.47 98.30 98.84 99.09 99.78 99.82 100.02 100.48 102.67 NA [2,] 96.35 97.48 98.34 99.14 99.12 99.80 99.82 100.00 100.72 102.87 NA [3,] 96.40 97.84 98.38 99.20 99.03 99.88 99.67 100.04 100.74 102.90 NA [4,] 96.66 97.90 98.42 99.33 99.00 99.74 99.78 99.99 100.88 102.88 NA [5,] 96.95 97.53 98.16 98.56 99.21 100.15 99.44 99.97 101.03 102.82 NA [6,] 97.14 97.61 98.18 98.65 99.35 100.27 99.61 99.77 101.47 102.94 NA [7,] 97.27 97.73 98.22 98.77 99.37 100.26 99.71 99.93 101.46 102.97 NA [8,] 97.34 97.76 98.29 98.82 99.39 100.36 99.71 99.90 101.46 103.01 NA [9,] 97.42 97.87 98.45 98.90 99.41 100.37 99.77 100.01 101.45 103.11 NA [10,] 97.47 97.85 98.54 98.89 99.43 100.54 99.77 100.08 101.74 103.21 NA [11,] 97.29 98.13 98.54 98.90 99.60 99.80 99.89 100.21 102.41 104.66 NA [12,] 97.36 98.21 98.78 99.07 99.73 99.82 99.96 100.28 102.54 104.79 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/1wsd31458316418.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/23m071458316418.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/3jutp1458316418.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/44onc1458316418.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,] 96.440 96.35 96.400 96.660 96.950 97.14 97.27 97.34 97.42 97.47 [2,] 98.300 98.34 98.380 98.420 98.160 98.18 98.22 98.29 98.45 98.54 [3,] 99.435 99.47 99.435 99.535 99.325 99.48 99.54 99.55 99.59 99.60 [4,] 100.020 100.00 100.040 99.990 100.150 100.27 100.26 100.36 100.37 100.54 [5,] 100.480 100.72 100.740 100.880 102.820 102.94 102.97 103.01 103.11 103.21 [,11] [,12] [1,] 97.29 97.360 [2,] 98.54 98.780 [3,] 99.70 99.775 [4,] 100.21 100.280 [5,] 102.41 100.280 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 98.57562 98.6406 98.6056 98.75057 98.33072 98.43575 98.52073 [2,] 100.29438 100.2994 100.2644 100.31943 100.31928 100.52425 100.55927 [,8] [,9] [,10] [,11] [,12] [1,] 98.51575 98.63069 98.60072 98.8656 99.02554 [2,] 100.58425 100.54931 100.59928 100.5344 100.52446 $out [1] 102.67 102.87 102.90 102.88 104.66 102.54 104.79 $group [1] 1 2 3 4 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(96.44, 98.3, 99.435, 100.02, 100.48, 96.35, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5c6nq1458316418.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] [,9] [,10] [1,] 96.350 97.470 98.160 98.560 99.000 99.740 99.61 99.900 100.480 102.670 [2,] 96.550 97.570 98.255 98.795 99.105 99.800 99.69 99.950 100.810 102.875 [3,] 97.205 97.800 98.360 98.895 99.360 100.015 99.77 100.005 101.455 102.955 [4,] 97.350 97.885 98.495 99.105 99.420 100.315 99.82 100.060 101.605 103.160 [5,] 97.470 98.210 98.780 99.330 99.730 100.540 99.96 100.210 102.540 103.210 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 96.84011 97.65633 98.25053 98.75361 99.21633 99.78011 99.71071 99.95483 [2,] 97.56989 97.94367 98.46947 99.03639 99.50367 100.24989 99.82929 100.05517 [,9] [,10] [,11] [1,] 101.0924 102.825 NA [2,] 101.8176 103.085 NA $out [1] 99.44 99.77 100.28 104.66 104.79 $group [1] 7 8 8 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(96.35, 96.55, 97.205, 97.35, 97.47, 97.47, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/690731458316418.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,] 1.691750 5.670 1.34750 [2,] 1.718864 5.720 1.43875 [3,] 1.738866 6.045 1.62625 [4,] 1.775521 6.510 1.82125 [5,] 1.786531 7.430 1.84750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.713025 5.684676 1.451789 [2,] 1.764708 6.405324 1.800711 $out [1] 2.158446 2.162273 $group [1] 1 1 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(1.69174991584979, 1.71886432176492, 1.73886645316798, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1wsd31458316418.ps tmp/1wsd31458316418.png",intern=TRUE)) character(0) > try(system("convert tmp/23m071458316418.ps tmp/23m071458316418.png",intern=TRUE)) character(0) > try(system("convert tmp/3jutp1458316418.ps tmp/3jutp1458316418.png",intern=TRUE)) character(0) > try(system("convert tmp/44onc1458316418.ps tmp/44onc1458316418.png",intern=TRUE)) character(0) > try(system("convert tmp/5c6nq1458316418.ps tmp/5c6nq1458316418.png",intern=TRUE)) character(0) > try(system("convert tmp/690731458316418.ps tmp/690731458316418.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.246 0.352 2.619