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(92.88,91.69,91.66,90.26,91.11,92.33,91.82,92.24,93.35,93.53,93.34,92.59,92.42,92.64,94.44,93.59,93.39,93.33,93.72,95.43,97.06,97.7,97.59,96.97,97.75,99.27,100.63,99.8,99.5,99.72,99.77,100.18,101.11,100.67,101.13,100.46,101.6,102.3,103.26,104.56,104.61,104.62,105.03,104.93,104.73,104.33,104.6,104.41,104.63,105.55,106.12,106.62,106.72,106.52,106.79,106.95,106.92,106.74,108.13,107.86) > 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,] 92.88 92.42 97.75 101.60 104.63 NA [2,] 91.69 92.64 99.27 102.30 105.55 NA [3,] 91.66 94.44 100.63 103.26 106.12 NA [4,] 90.26 93.59 99.80 104.56 106.62 NA [5,] 91.11 93.39 99.50 104.61 106.72 NA [6,] 92.33 93.33 99.72 104.62 106.52 NA [7,] 91.82 93.72 99.77 105.03 106.79 NA [8,] 92.24 95.43 100.18 104.93 106.95 NA [9,] 93.35 97.06 101.11 104.73 106.92 NA [10,] 93.53 97.70 100.67 104.33 106.74 NA [11,] 93.34 97.59 101.13 104.60 108.13 NA [12,] 92.59 96.97 100.46 104.41 107.86 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/1li2u1458679858.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/2tydq1458679858.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/30neo1458679858.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/4kz6j1458679858.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.42 91.69 91.66 90.26 91.11 92.33 91.82 92.24 93.35 93.53 [2,] 92.88 92.64 94.44 93.59 93.39 93.33 93.72 95.43 97.06 97.70 [3,] 97.75 99.27 100.63 99.80 99.50 99.72 99.77 100.18 101.11 100.67 [4,] 101.60 102.30 103.26 104.56 104.61 104.62 105.03 104.93 104.73 104.33 [5,] 104.63 105.55 106.12 106.62 106.72 106.52 106.79 106.95 106.92 106.74 [,11] [,12] [1,] 93.34 92.59 [2,] 97.59 96.97 [3,] 101.13 100.46 [4,] 104.60 104.41 [5,] 108.13 107.86 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 91.58847 92.44427 94.39781 92.04863 91.57198 91.74251 91.77838 [2,] 103.91153 106.09573 106.86219 107.55137 107.42802 107.69749 107.76162 [,8] [,9] [,10] [,11] [,12] [1,] 93.46732 95.6904 95.98526 96.17675 95.20291 [2,] 106.89268 106.5296 105.35474 106.08325 105.71709 $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(92.42, 92.88, 97.75, 101.6, 104.63, 91.69, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5mm9p1458679858.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,] 90.260 92.420 99.27 103.260 105.550 NA [2,] 91.675 93.360 99.61 103.795 106.320 NA [3,] 92.285 94.080 99.99 104.580 106.730 NA [4,] 93.110 97.015 100.65 104.675 106.935 NA [5,] 93.530 97.700 101.13 105.030 106.950 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 91.63049 92.41293 99.51565 104.1786 106.4495 NA [2,] 92.93951 95.74707 100.46435 104.9814 107.0105 NA $out [1] 97.75 101.60 102.30 104.63 108.13 107.86 $group [1] 3 4 4 5 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(90.26, 91.675, 92.285, 93.11, 93.53, 92.42, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6aytk1458679858.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,] 5.244333 12.210 6.630 [2,] 5.660405 13.715 7.555 [3,] 6.032743 14.585 9.160 [4,] 6.527787 15.120 11.095 [5,] 6.986915 16.360 11.310 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 5.637124 13.94417 7.545382 [2,] 6.428361 15.22583 10.774618 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(5.24433313205788, 5.66040514363814, 6.03274263822007, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1li2u1458679858.ps tmp/1li2u1458679858.png",intern=TRUE)) character(0) > try(system("convert tmp/2tydq1458679858.ps tmp/2tydq1458679858.png",intern=TRUE)) character(0) > try(system("convert tmp/30neo1458679858.ps tmp/30neo1458679858.png",intern=TRUE)) character(0) > try(system("convert tmp/4kz6j1458679858.ps tmp/4kz6j1458679858.png",intern=TRUE)) character(0) > try(system("convert tmp/5mm9p1458679858.ps tmp/5mm9p1458679858.png",intern=TRUE)) character(0) > try(system("convert tmp/6aytk1458679858.ps tmp/6aytk1458679858.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.178 0.358 2.565