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(726,784,884,696,893,674,703,799,793,799,1022,758,1021,944,915,864,1022,891,1087,822,890,1092,967,833,1104,1063,1103,1039,1185,1047,1155,878,879,1133,920,943,938,900,781,1040,792,653,866,679,799,760,699,762,671,679,862,624,516,650,583,444,562,540,524,674) > 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,] 726 1021 1104 938 671 NA [2,] 784 944 1063 900 679 NA [3,] 884 915 1103 781 862 NA [4,] 696 864 1039 1040 624 NA [5,] 893 1022 1185 792 516 NA [6,] 674 891 1047 653 650 NA [7,] 703 1087 1155 866 583 NA [8,] 799 822 878 679 444 NA [9,] 793 890 879 799 562 NA [10,] 799 1092 1133 760 540 NA [11,] 1022 967 920 699 524 NA [12,] 758 833 943 762 674 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/1fyyz1458682432.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/2u2761458682432.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/3e8731458682432.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/4oacf1458682432.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,] 671 679 862 624 516 650 583 679 793 540 524 674 [2,] 726 784 862 696 792 653 703 679 793 760 699 758 [3,] 938 900 884 864 893 674 866 799 799 799 920 762 [4,] 1021 944 915 1039 1022 891 1087 822 879 1092 967 833 [5,] 1104 1063 915 1040 1185 1047 1155 878 890 1133 1022 943 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 729.5537 786.9444 846.5503 621.6371 730.4826 505.8298 594.6666 [2,] 1146.4463 1013.0556 921.4497 1106.3629 1055.5174 842.1702 1137.3334 [,8] [,9] [,10] [,11] [,12] [1,] 697.9566 738.2326 564.4096 730.6319 709.0052 [2,] 900.0434 859.7674 1033.5904 1109.3681 814.9948 $out [1] 1103 781 444 562 $group [1] 3 3 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(671, 726, 938, 1021, 1104, 679, 784, 900, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ck3v1458682432.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,] 674.0 822.0 878.0 653.0 444.0 NA [2,] 714.5 877.0 931.5 729.5 532.0 NA [3,] 788.5 929.5 1055.0 786.5 603.5 NA [4,] 841.5 1021.5 1118.5 883.0 672.5 NA [5,] 1022.0 1092.0 1185.0 1040.0 862.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 730.5744 863.5926 969.708 716.4876 539.417 NA [2,] 846.4256 995.4074 1140.292 856.5124 667.583 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(674, 714.5, 788.5, 841.5, 1022, 822, 877, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/67i0f1458682432.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,] 100.5510 269.0 53.0 [2,] 139.9905 356.0 114.5 [3,] 182.9575 424.5 234.0 [4,] 226.4371 535.0 313.5 [5,] 251.7862 669.0 384.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 143.5286 342.8569 143.2348 [2,] 222.3863 506.1431 324.7652 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(100.550982093662, 139.990526984779, 182.957472254126, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1fyyz1458682432.ps tmp/1fyyz1458682432.png",intern=TRUE)) character(0) > try(system("convert tmp/2u2761458682432.ps tmp/2u2761458682432.png",intern=TRUE)) character(0) > try(system("convert tmp/3e8731458682432.ps tmp/3e8731458682432.png",intern=TRUE)) character(0) > try(system("convert tmp/4oacf1458682432.ps tmp/4oacf1458682432.png",intern=TRUE)) character(0) > try(system("convert tmp/5ck3v1458682432.ps tmp/5ck3v1458682432.png",intern=TRUE)) character(0) > try(system("convert tmp/67i0f1458682432.ps tmp/67i0f1458682432.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.239 0.372 2.634