R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-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(58608,46865,51378,46235,47206,45382,41227,33795,31295,42625,33625,21538,56421,53152,53536,52408,41454,38271,35306,26414,31917,38030,27534,18387,50556,43901,48572,43899,37532,40357,35489,29027,34485,42598,30306,26451,47460,50104,61465,53726,39477,43895,31481,29896,33842,39120,33702,25094,51442,45594,52518,48564,41745,49585,32747,33379,35645,37034,35681,20972,58552,54955,65540,51570,51145,46641,35704,33253,35193,41668,34865,21210,56126,49231,59723,48103,47472,50497,40059,34149,36860,46356,36577,23872,57276,56389,57657,62300,48929,51168,39636,33213,38127,43291,30600,21956,48033,46148,50736,48114,38390,44112,36287,30333,35908,40005,35263,26591,49771,47882,64830,57846,48188,54400,39778,37772,37214,43829,40701,29450,53597,53588,64172,53955,55509,48908,35331,38073,41776,42717,40736,49020,45099,44114,60487,48760,41281,48346,37025,31514,33977,42060,36036,22012) > 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] 144 > (np <- floor(n / par1)) [1] 12 > 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] 12 12 12 12 12 12 12 12 12 12 12 12 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 58608 56421 50556 47460 51442 58552 56126 57276 48033 49771 53597 45099 [2,] 46865 53152 43901 50104 45594 54955 49231 56389 46148 47882 53588 44114 [3,] 51378 53536 48572 61465 52518 65540 59723 57657 50736 64830 64172 60487 [4,] 46235 52408 43899 53726 48564 51570 48103 62300 48114 57846 53955 48760 [5,] 47206 41454 37532 39477 41745 51145 47472 48929 38390 48188 55509 41281 [6,] 45382 38271 40357 43895 49585 46641 50497 51168 44112 54400 48908 48346 [7,] 41227 35306 35489 31481 32747 35704 40059 39636 36287 39778 35331 37025 [8,] 33795 26414 29027 29896 33379 33253 34149 33213 30333 37772 38073 31514 [9,] 31295 31917 34485 33842 35645 35193 36860 38127 35908 37214 41776 33977 [10,] 42625 38030 42598 39120 37034 41668 46356 43291 40005 43829 42717 42060 [11,] 33625 27534 30306 33702 35681 34865 36577 30600 35263 40701 40736 36036 [12,] 21538 18387 26451 25094 20972 21210 23872 21956 26591 29450 49020 22012 [,13] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/1atca1389605375.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/2n3xt1389605375.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/3at3v1389605375.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/4x18r1389605375.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] [1,] 45099.0 43901.0 48572.0 43899.0 37532.0 38271.0 31481.0 26414.0 31295.0 [2,] 48902.0 45871.0 51948.0 48108.5 40379.0 44003.5 35318.5 30114.5 33909.5 [3,] 52519.5 48556.5 58690.0 50165.0 44475.5 47493.5 35995.5 33233.0 35419.0 [4,] 56848.5 53370.0 62818.5 53840.5 48558.5 50041.0 39707.0 33972.0 37037.0 [5,] 58608.0 56389.0 65540.0 62300.0 55509.0 54400.0 41227.0 38073.0 38127.0 [,10] [,11] [,12] [1,] 37034.0 27534.0 18387 [2,] 39562.5 32112.5 21374 [3,] 42329.0 35064.0 22942 [4,] 43004.0 36306.5 26521 [5,] 46356.0 40736.0 29450 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 48895.05 45136.16 53731.89 47550.6 40744.78 44739.76 33993.88 31473.57 [2,] 56143.95 51976.84 63648.11 52779.4 48206.22 50247.24 37997.12 34992.43 [,9] [,10] [,11] [,12] [1,] 33992.53 40759.31 33151.09 20594.42 [2,] 36845.47 43898.69 36976.91 25289.58 $out [1] 41776 49020 $group [1] 9 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(45099, 48902, 52519.5, 56848.5, 58608, 43901, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5j1k81389605375.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] [1,] 21538.0 18387.0 26451.0 25094.0 20972.0 21210.0 23872.0 21956.0 26591.0 [2,] 33710.0 29725.5 32395.5 32591.5 34512.0 35029.0 36718.5 35670.0 35585.5 [3,] 44003.5 38150.5 38944.5 39298.5 39389.5 44154.5 46914.0 46110.0 39197.5 [4,] 47035.5 52780.0 43900.0 48782.0 49074.5 53262.5 49864.0 56832.5 47090.5 [5,] 58608.0 56421.0 50556.0 61465.0 52518.0 65540.0 59723.0 62300.0 50736.0 [,10] [,11] [,12] [,13] [1,] 29450.0 35331 22012.0 NA [2,] 38775.0 41256 35006.5 NA [3,] 45855.5 48964 41670.5 NA [4,] 52085.5 53776 46722.5 NA [5,] 64830.0 64172 60487.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 37925.65 27635.19 33697.22 31913.9 32747.45 35838.08 40918.25 36457.64 [2,] 50081.35 48665.81 44191.78 46683.1 46031.55 52470.92 52909.75 55762.36 [,9] [,10] [,11] [,12] [,13] [1,] 33949.99 39784.49 43253.54 36326.75 NA [2,] 44445.01 51926.51 54674.46 47014.25 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" NA Warning message: In bxp(list(stats = c(21538, 33710, 44003.5, 47035.5, 58608, 18387, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6h5n01389605375.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,] 2632.735 9322.0 3005.250 [2,] 3198.296 11070.0 3481.125 [3,] 4473.037 13355.5 5351.000 [4,] 5406.200 17472.5 7274.875 [5,] 7997.741 18401.0 9908.750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3465.997 10435.28 3620.645 [2,] 5480.077 16275.72 7081.355 $out [1] 30633 $group [1] 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(2632.73461212458, 3198.29576086871, 4473.03713469585, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1atca1389605375.ps tmp/1atca1389605375.png",intern=TRUE)) character(0) > try(system("convert tmp/2n3xt1389605375.ps tmp/2n3xt1389605375.png",intern=TRUE)) character(0) > try(system("convert tmp/3at3v1389605375.ps tmp/3at3v1389605375.png",intern=TRUE)) character(0) > try(system("convert tmp/4x18r1389605375.ps tmp/4x18r1389605375.png",intern=TRUE)) character(0) > try(system("convert tmp/5j1k81389605375.ps tmp/5j1k81389605375.png",intern=TRUE)) character(0) > try(system("convert tmp/6h5n01389605375.ps tmp/6h5n01389605375.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.167 1.370 7.531