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(81432,81935,82229,82963,82975,82892,82692,82648,83479,84176,84589,84857,84586,84635,84927,85563,86962,87780,88515,88800,89218,89626,89939,90663,91302,91560,92290,93281,94535,94855,95536,96008,96627,96738,96212,94198,93123,93022,93993,94876,95251,96216,96632,97023,97799,98001,98069,98172,98448,98157,98009,98020,97802,98006,98262,98629,99043,99289,99682,99979) > 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,] 81432 84586 91302 93123 98448 NA [2,] 81935 84635 91560 93022 98157 NA [3,] 82229 84927 92290 93993 98009 NA [4,] 82963 85563 93281 94876 98020 NA [5,] 82975 86962 94535 95251 97802 NA [6,] 82892 87780 94855 96216 98006 NA [7,] 82692 88515 95536 96632 98262 NA [8,] 82648 88800 96008 97023 98629 NA [9,] 83479 89218 96627 97799 99043 NA [10,] 84176 89626 96738 98001 99289 NA [11,] 84589 89939 96212 98069 99682 NA [12,] 84857 90663 94198 98172 99979 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/1ijk91458630961.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/2812m1458630961.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/3nbrw1458630961.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/4zgdq1458630961.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] [,12] [1,] 81432 81935 82229 82963 82975 82892 82692 82648 83479 84176 84589 84857 [2,] 84586 84635 84927 85563 86962 87780 88515 88800 89218 89626 89939 90663 [3,] 91302 91560 92290 93281 94535 94855 95536 96008 96627 96738 96212 94198 [4,] 93123 93022 93993 94876 95251 96216 96632 97023 97799 98001 98069 98172 [5,] 98448 98157 98009 98020 97802 98006 98262 98629 99043 99289 99682 99979 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 85269.78 85633.77 85883.99 86700.46 88678.01 88894.14 89800.55 [2,] 97334.22 97486.23 98696.01 99861.54 100391.99 100815.86 101271.45 [,8] [,9] [,10] [,11] [,12] [1,] 90197.65 90563.69 90820.25 90467.36 88892.16 [2,] 101818.35 102690.31 102655.75 101956.64 99503.84 $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(81432, 84586, 91302, 93123, 98448, 81935, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5beba1458630961.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,] 81432.0 84586.0 91302.0 93022.0 97802.0 NA [2,] 82438.5 85245.0 92785.5 94434.5 98014.5 NA [3,] 82927.5 88147.5 94695.0 96424.0 98355.0 NA [4,] 83827.5 89422.0 96110.0 97900.0 99166.0 NA [5,] 84857.0 90663.0 96738.0 98172.0 99979.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 82293.97 86242.34 93178.67 94843.36 97829.79 NA [2,] 83561.03 90052.66 96211.33 98004.64 98880.21 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(81432, 82438.5, 82927.5, 83827.5, 84857, 84586, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6mvkd1458630961.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,] 6062.487 14827.0 8117.0 [2,] 6335.141 15103.0 8176.5 [3,] 6492.288 15343.0 8381.0 [4,] 6606.787 15880.5 8559.0 [5,] 6806.120 17016.0 9066.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 6368.388 14988.38 8206.539 [2,] 6616.187 15697.62 8555.461 $out [1] 9313 7509 $group [1] 3 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(6062.48741854365, 6335.14092948344, 6492.28777214091, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ijk91458630961.ps tmp/1ijk91458630961.png",intern=TRUE)) character(0) > try(system("convert tmp/2812m1458630961.ps tmp/2812m1458630961.png",intern=TRUE)) character(0) > try(system("convert tmp/3nbrw1458630961.ps tmp/3nbrw1458630961.png",intern=TRUE)) character(0) > try(system("convert tmp/4zgdq1458630961.ps tmp/4zgdq1458630961.png",intern=TRUE)) character(0) > try(system("convert tmp/5beba1458630961.ps tmp/5beba1458630961.png",intern=TRUE)) character(0) > try(system("convert tmp/6mvkd1458630961.ps tmp/6mvkd1458630961.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.476 0.439 2.932