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(92.09,93.77,94.44,94.91,94.78,94.51,94.36,96.6,96.72,96.71,97.44,97.83,98.92,97.98,98.76,99.76,99.87,100.09,100.07,99.46,100.4,101.25,102.29,102.1,105.91,108.95,110.07,109.92,109.87,110.54,110.79,110.32,110.76,110.24,110.27,110.11,110.39,111.05,110.85,110.24,108.7,109.93,109.53,109.83,107.86,104.61,103.61,103.11,102.59,102.91,101.94,101.8,102.25,102.6,102.49,102.13,100.76,100.86,101.12,100.74,99.99,99.39,99.52,99.21,99.38,99.37,99.38,99.26,99.36,99.2,98.53,98.65,99.15,100.17,99.98,100.07,99.94,100.05,99.13,98.74,98.64,98.44,98.81,98.88,99.63,100.08,100.07,100.55,99.98,99.89,99.86,99.61,100.12,100.24,100.1,99.86,97.99,97.57,98.28,97.97,97.99,97.84,97.33,96.7,96.79,96.76,96.23,96.29,96.46,97.23,97.59,97.13,97.37,96.12,96.96,96.7,97,97.15,96.51,96.68) > 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,] 92.09 98.92 105.91 110.39 102.59 99.99 99.15 99.63 97.99 96.46 NA [2,] 93.77 97.98 108.95 111.05 102.91 99.39 100.17 100.08 97.57 97.23 NA [3,] 94.44 98.76 110.07 110.85 101.94 99.52 99.98 100.07 98.28 97.59 NA [4,] 94.91 99.76 109.92 110.24 101.80 99.21 100.07 100.55 97.97 97.13 NA [5,] 94.78 99.87 109.87 108.70 102.25 99.38 99.94 99.98 97.99 97.37 NA [6,] 94.51 100.09 110.54 109.93 102.60 99.37 100.05 99.89 97.84 96.12 NA [7,] 94.36 100.07 110.79 109.53 102.49 99.38 99.13 99.86 97.33 96.96 NA [8,] 96.60 99.46 110.32 109.83 102.13 99.26 98.74 99.61 96.70 96.70 NA [9,] 96.72 100.40 110.76 107.86 100.76 99.36 98.64 100.12 96.79 97.00 NA [10,] 96.71 101.25 110.24 104.61 100.86 99.20 98.44 100.24 96.76 97.15 NA [11,] 97.44 102.29 110.27 103.61 101.12 98.53 98.81 100.10 96.23 96.51 NA [12,] 97.83 102.10 110.11 103.11 100.74 98.65 98.88 99.86 96.29 96.68 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/1dg641458629604.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/2jxmq1458629604.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/3ck811458629604.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/4j09f1458629604.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,] 92.09 93.770 94.44 94.910 94.780 94.51 94.36 96.60 96.72 96.71 [2,] 97.99 97.570 98.28 97.970 97.990 97.84 97.33 96.70 97.00 97.15 [3,] 99.39 99.735 99.75 99.915 99.905 99.97 99.62 99.36 99.74 99.72 [4,] 102.59 102.910 101.94 101.800 102.250 102.60 102.49 102.13 100.76 101.25 [5,] 105.91 108.950 101.94 101.800 102.250 102.60 109.53 109.83 100.76 104.61 [,11] [,12] [1,] 96.230 96.29 [2,] 97.440 97.83 [3,] 99.455 99.37 [4,] 102.290 102.10 [5,] 103.610 103.11 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 97.09166 97.06692 97.92132 98.00138 97.77653 97.59171 97.04186 [2,] 101.68834 102.40308 101.57868 101.82862 102.03347 102.34829 102.19814 [,8] [,9] [,10] [,11] [,12] [1,] 96.64696 97.86135 97.67148 97.03175 97.23654 [2,] 102.07304 101.61865 101.76852 101.87825 101.50346 $out [1] 110.39 111.05 110.07 110.85 109.92 110.24 109.87 108.70 110.54 109.93 [11] 110.79 110.32 110.76 107.86 110.24 110.27 110.11 $group [1] 1 2 3 3 4 4 5 5 6 6 7 8 9 9 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(92.09, 97.99, 99.39, 102.59, 105.91, 93.77, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/535bl1458629604.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,] 92.090 97.980 109.870 103.110 100.740 99.200 98.440 99.610 96.23 96.120 [2,] 94.400 99.190 109.895 106.235 100.990 99.205 98.775 99.860 96.73 96.595 [3,] 94.845 99.970 110.175 109.680 102.035 99.365 99.140 100.025 97.45 96.980 [4,] 96.715 100.825 110.430 110.315 102.540 99.385 100.015 100.110 97.98 97.190 [5,] 97.830 102.290 110.790 111.050 102.910 99.520 100.170 100.240 98.28 97.590 [,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,] 93.78911 99.22427 109.931 107.8191 101.328 99.2829 98.57443 99.91097 [2,] 95.90089 100.71573 110.419 111.5409 102.742 99.4471 99.70557 100.13903 [,9] [,10] [,11] [1,] 96.87987 96.70862 NA [2,] 98.02013 97.25138 NA $out [1] 105.91 108.95 99.99 98.53 98.65 100.55 $group [1] 3 3 6 6 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(92.09, 94.4, 94.845, 96.715, 97.83, 97.98, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6yded1458629604.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,] 4.050068 13.53 3.07250 [2,] 4.480318 13.93 3.30250 [3,] 5.067174 15.21 3.72125 [4,] 5.292068 16.42 4.19500 [5,] 5.367294 18.30 4.55250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4.696929 14.07429 3.314175 [2,] 5.437418 16.34571 4.128325 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.05006790066537, 4.48031757817092, 5.06717377295921, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1dg641458629604.ps tmp/1dg641458629604.png",intern=TRUE)) character(0) > try(system("convert tmp/2jxmq1458629604.ps tmp/2jxmq1458629604.png",intern=TRUE)) character(0) > try(system("convert tmp/3ck811458629604.ps tmp/3ck811458629604.png",intern=TRUE)) character(0) > try(system("convert tmp/4j09f1458629604.ps tmp/4j09f1458629604.png",intern=TRUE)) character(0) > try(system("convert tmp/535bl1458629604.ps tmp/535bl1458629604.png",intern=TRUE)) character(0) > try(system("convert tmp/6yded1458629604.ps tmp/6yded1458629604.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.072 0.382 2.468