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(96.86,96.89,96.90,96.94,96.88,96.89,96.89,96.95,97.03,97.29,97.37,97.41,97.41,97.41,97.46,97.51,97.56,97.61,97.66,97.71,97.76,97.81,97.86,97.91,97.96,98.01,98.06,98.12,98.17,98.22,98.27,98.32,98.37,98.42,98.47,98.52,98.57,98.62,98.67,98.72,98.77,98.82,98.87,98.92,98.97,99.02,99.07,99.12,99.18,99.23,99.28,99.33,99.38,99.43,99.48,99.53,99.58,99.63,99.68,99.73,99.78,99.83,99.88,99.93,99.98,100.03,100.08,100.13,100.19,100.24,100.29,100.34,100.39,100.44,100.49,100.54,100.59,100.64,100.69,100.74,100.79,100.84,100.89,100.94,100.99,101.04,101.09,101.14,101.20,101.25,101.30,101.35,101.40,101.45,101.50,101.55,101.60,101.65,101.70,101.75,101.80,101.85,101.90,101.95,102.00,102.05,102.10,102.15) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 96.86 97.41 97.96 98.57 99.18 99.78 100.39 100.99 101.60 NA [2,] 96.89 97.41 98.01 98.62 99.23 99.83 100.44 101.04 101.65 NA [3,] 96.90 97.46 98.06 98.67 99.28 99.88 100.49 101.09 101.70 NA [4,] 96.94 97.51 98.12 98.72 99.33 99.93 100.54 101.14 101.75 NA [5,] 96.88 97.56 98.17 98.77 99.38 99.98 100.59 101.20 101.80 NA [6,] 96.89 97.61 98.22 98.82 99.43 100.03 100.64 101.25 101.85 NA [7,] 96.89 97.66 98.27 98.87 99.48 100.08 100.69 101.30 101.90 NA [8,] 96.95 97.71 98.32 98.92 99.53 100.13 100.74 101.35 101.95 NA [9,] 97.03 97.76 98.37 98.97 99.58 100.19 100.79 101.40 102.00 NA [10,] 97.29 97.81 98.42 99.02 99.63 100.24 100.84 101.45 102.05 NA [11,] 97.37 97.86 98.47 99.07 99.68 100.29 100.89 101.50 102.10 NA [12,] 97.41 97.91 98.52 99.12 99.73 100.34 100.94 101.55 102.15 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/1d0dy1460558845.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/2tli01460558845.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/3u66i1460558845.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/4x3h61460558845.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.86 96.89 96.90 96.94 96.88 96.89 96.89 96.95 97.03 97.29 [2,] 97.96 98.01 98.06 98.12 98.17 98.22 98.27 98.32 98.37 98.42 [3,] 99.18 99.23 99.28 99.33 99.38 99.43 99.48 99.53 99.58 99.63 [4,] 100.39 100.44 100.49 100.54 100.59 100.64 100.69 100.74 100.79 100.84 [5,] 101.60 101.65 101.70 101.75 101.80 101.85 101.90 101.95 102.00 102.05 [,11] [,12] [1,] 97.37 97.41 [2,] 98.47 98.52 [3,] 99.68 99.73 [4,] 100.89 100.94 [5,] 102.10 102.15 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 97.9002 97.9502 98.0002 98.05547 98.10547 98.15547 98.20547 [2,] 100.4598 100.5098 100.5598 100.60453 100.65453 100.70453 100.75453 [,8] [,9] [,10] [,11] [,12] [1,] 98.25547 98.30547 98.35547 98.40547 98.45547 [2,] 100.80453 100.85453 100.90453 100.95453 101.00453 $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(96.86, 97.96, 99.18, 100.39, 101.6, 96.89, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5z2rw1460558845.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.86 97.410 97.960 98.570 99.180 99.780 100.390 100.990 101.600 NA [2,] 96.89 97.485 98.090 98.695 99.305 99.905 100.515 101.115 101.725 NA [3,] 96.92 97.635 98.245 98.845 99.455 100.055 100.665 101.275 101.875 NA [4,] 97.16 97.785 98.395 98.995 99.605 100.215 100.815 101.425 102.025 NA [5,] 97.41 97.910 98.520 99.120 99.730 100.340 100.940 101.550 102.150 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 96.79685 97.49817 98.10589 98.70817 99.31817 99.91361 100.5282 101.1336 [2,] 97.04315 97.77183 98.38411 98.98183 99.59183 100.19639 100.8018 101.4164 [,9] [,10] [1,] 101.7382 NA [2,] 102.0118 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(96.86, 96.89, 96.92, 97.16, 97.41, 97.41, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/691ii1460558845.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.632896 4.730 2.420 [2,] 1.642020 4.750 2.420 [3,] 1.650969 4.805 2.420 [4,] 1.681618 4.965 2.425 [5,] 1.689896 5.010 2.430 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.632908 4.706937 2.417719 [2,] 1.669030 4.903063 2.422281 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(1.63289620000783, 1.64202015001804, 1.6509689321521, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1d0dy1460558845.ps tmp/1d0dy1460558845.png",intern=TRUE)) character(0) > try(system("convert tmp/2tli01460558845.ps tmp/2tli01460558845.png",intern=TRUE)) character(0) > try(system("convert tmp/3u66i1460558845.ps tmp/3u66i1460558845.png",intern=TRUE)) character(0) > try(system("convert tmp/4x3h61460558845.ps tmp/4x3h61460558845.png",intern=TRUE)) character(0) > try(system("convert tmp/5z2rw1460558845.ps tmp/5z2rw1460558845.png",intern=TRUE)) character(0) > try(system("convert tmp/691ii1460558845.ps tmp/691ii1460558845.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.182 0.332 2.540