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(426.113 + ,383.703 + ,232.444 + ,70.939 + ,226.731 + ,947.293 + ,611.281 + ,158.047 + ,33.999 + ,37.028 + ,388.3 + ,506.652 + ,392.25 + ,180.818 + ,198.296 + ,217.465 + ,275.562 + ,1030.944 + ,57.47 + ,136.452 + ,556.277 + ,213.361 + ,274.482 + ,220.553 + ,236.71 + ,260.642 + ,2763.544 + ,213.923 + ,169.861 + ,403.064 + ,449.594 + ,406.167 + ,206.893 + ,156.187 + ,257.102 + ,62.156 + ,662.883 + ,251.422 + ,171.328 + ,350.089 + ,221.588 + ,4.813 + ,183.186 + ,190.379 + ,223.166 + ,232.669 + ,356.725 + ,109.215 + ,475.834 + ,315.955 + ,694.87 + ,8.95 + ,278.741 + ,308.16 + ,207.533 + ,192.797 + ,601.162 + ,289.714 + ,293.671 + ,386.688 + ,699.645 + ,85.094 + ,131.812 + ,645.285 + ,197.549 + ,308.174 + ,86.58 + ,242.205 + ,238.502 + ,187.881 + ,140.321 + ,440.31 + ,421.403 + ,218.761 + ,1305.923 + ,137.55 + ,262.517 + ,348.821 + ,150.034 + ,64.016 + ,261.596 + ,259.7 + ,171.26 + ,203.077 + ,249.148 + ,211.655 + ,252.64 + ,438.555 + ,239.89 + ,401.915 + ,216.886 + ,184.641 + ,380.155 + ,653.641 + ,313.906 + ,366.936 + ,236.302 + ,229.641 + ,235.577 + ,103.898 + ,263.906 + ,241.171 + ,216.548 + ,295.281 + ,193.299 + ,204.386 + ,257.567 + ,136.813 + ,240.755 + ,59.609 + ,213.511 + ,380.531 + ,242.344 + ,250.407 + ,183.613 + ,191.835 + ,266.793 + ,246.542 + ,330.563 + ,403.556 + ,208.108 + ,324.04 + ,308.532 + ,199.297 + ,200.156 + ,262.875 + ,287.069 + ,190.157 + ,199.746 + ,265.777 + ,435.956 + ,72.844 + ,756.46 + ,206.771 + ,4202.361 + ,401.422 + ,216.046 + ,39.047 + ,441.437) > par1 = '30' > par1 <- '30' > #'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] 139 > (np <- floor(n / par1)) [1] 4 > 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 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 426.113 449.594 699.645 216.886 208.108 [2,] 383.703 406.167 85.094 184.641 324.040 [3,] 232.444 206.893 131.812 380.155 308.532 [4,] 70.939 156.187 645.285 653.641 199.297 [5,] 226.731 257.102 197.549 313.906 200.156 [6,] 947.293 62.156 308.174 366.936 262.875 [7,] 611.281 662.883 86.580 236.302 287.069 [8,] 158.047 251.422 242.205 229.641 190.157 [9,] 33.999 171.328 238.502 235.577 199.746 [10,] 37.028 350.089 187.881 103.898 265.777 [11,] 388.300 221.588 140.321 263.906 435.956 [12,] 506.652 4.813 440.310 241.171 72.844 [13,] 392.250 183.186 421.403 216.548 756.460 [14,] 180.818 190.379 218.761 295.281 206.771 [15,] 198.296 223.166 1305.923 193.299 4202.361 [16,] 217.465 232.669 137.550 204.386 401.422 [17,] 275.562 356.725 262.517 257.567 216.046 [18,] 1030.944 109.215 348.821 136.813 39.047 [19,] 57.470 475.834 150.034 240.755 441.437 [20,] 136.452 315.955 64.016 59.609 NA [21,] 556.277 694.870 261.596 213.511 NA [22,] 213.361 8.950 259.700 380.531 NA [23,] 274.482 278.741 171.260 242.344 NA [24,] 220.553 308.160 203.077 250.407 NA [25,] 236.710 207.533 249.148 183.613 NA [26,] 260.642 192.797 211.655 191.835 NA [27,] 2763.544 601.162 252.640 266.793 NA [28,] 213.923 289.714 438.555 246.542 NA [29,] 169.861 293.671 239.890 330.563 NA [30,] 403.064 386.688 401.915 403.556 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/1hvsm1381224807.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/2v5kv1381224807.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/3qdk21381224807.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/4hwkg1381224807.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,] 208.108 85.094 131.812 70.939 197.549 262.875 86.580 158.047 171.328 [2,] 216.886 184.641 206.893 156.187 200.156 262.875 236.302 190.157 171.328 [3,] 426.113 324.040 232.444 199.297 226.731 308.174 287.069 229.641 199.746 [4,] 449.594 383.703 308.532 645.285 257.102 366.936 611.281 242.205 235.577 [5,] 699.645 406.167 380.155 653.641 313.906 366.936 662.883 251.422 238.502 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 37.028 140.321 4.813 183.186 180.818 193.299 204.386 257.567 39.047 [2,] 103.898 221.588 72.844 216.548 190.379 198.296 204.386 257.567 109.215 [3,] 187.881 263.906 241.171 392.250 206.771 223.166 217.465 262.517 136.813 [4,] 265.777 388.300 440.310 421.403 218.761 1305.923 232.669 275.562 348.821 [5,] 350.089 435.956 506.652 421.403 218.761 1305.923 232.669 275.562 348.821 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [1,] 57.470 59.6090 213.5110 8.9500 171.2600 203.0770 183.6130 191.8350 [2,] 150.034 61.8125 237.5535 111.1555 206.8020 211.8150 195.5730 192.3160 [3,] 240.755 100.2340 408.9365 236.5305 258.4130 235.4800 222.1215 202.2260 [4,] 441.437 226.2035 625.5735 320.1155 276.6115 279.2835 242.9290 236.1485 [5,] 475.834 315.9550 694.8700 380.5310 278.7410 308.1600 249.1480 260.6420 [,27] [,28] [,29] [,30] [1,] 252.6400 213.9230 169.8610 386.6880 [2,] 259.7165 230.2325 204.8755 394.3015 [3,] 433.9775 268.1280 266.7805 402.4895 [4,] 1682.3530 364.1345 312.1170 403.3100 [5,] 2763.5440 438.5550 330.5630 403.5560 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 261.6821 183.3833 160.6261 -146.2984 186.4931 234.6448 22.10978 192.864 [2,] 590.5439 464.6967 304.2619 544.8924 266.9689 381.7032 552.02822 266.418 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 154.3478 73.49771 146.1077 -18.47955 247.5 186.7164 -559.4804 197.4803 [2,] 245.1442 302.26429 381.7043 500.82155 537.0 226.8256 1005.8124 237.4497 [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 249.8018 -32.492 34.85037 -29.63489 102.4007 71.4521 203.2635 182.1799 [2,] 275.2322 306.118 446.65963 230.10289 715.4723 401.6089 313.5625 288.7801 [,25] [,26] [,27] [,28] [,29] [,30] [1,] 184.7103 167.5983 -689.9053 162.3454 182.0597 395.3728 [2,] 259.5327 236.8537 1557.8603 373.9106 351.5013 409.6062 $out [1] 947.293 62.156 33.999 756.460 295.281 4202.361 137.550 401.422 [9] 356.725 216.046 1030.944 $group [1] 6 6 9 13 14 15 16 16 17 17 18 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" Warning message: In bxp(list(stats = c(208.108, 216.886, 426.113, 449.594, 699.645, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/531ix1381224807.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] [1,] 33.999 4.813 64.0160 103.898 39.047 [2,] 180.818 190.379 171.2600 204.386 199.951 [3,] 234.577 254.262 241.0475 240.963 262.875 [4,] 403.064 356.725 348.8210 295.281 362.731 [5,] 611.281 601.162 440.3100 403.556 441.437 $n [1] 30 30 30 30 19 $conf [,1] [,2] [,3] [,4] [,5] [1,] 170.4663 206.2766 189.827 214.7428 203.871 [2,] 298.6877 302.2474 292.268 267.1832 321.879 $out [1] 947.293 1030.944 2763.544 662.883 694.870 699.645 645.285 1305.923 [9] 653.641 59.609 756.460 4202.361 $group [1] 1 1 1 2 2 3 3 3 4 4 5 5 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(33.999, 180.818, 234.577, 403.064, 611.281, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6hegy1381224807.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,] 8.10771 16.8680 5.07875 [2,] 49.69542 116.3570 50.97375 [3,] 120.54781 279.7535 111.23725 [4,] 228.06961 501.8390 239.60600 [5,] 406.92553 991.8970 489.09800 $n [1] 30 30 30 $conf [,1] [,2] [,3] [1,] 69.0927 168.5546 56.82303 [2,] 172.0029 390.9524 165.65147 $out [1] 1731.5763 1205.8113 4009.0620 2510.9040 1107.6270 878.5027 $group [1] 1 1 2 2 3 3 $names [1] "S.D." "Range" "IQR" > dev.off() null device 1 > > try(system("convert tmp/1hvsm1381224807.ps tmp/1hvsm1381224807.png",intern=TRUE)) character(0) > try(system("convert tmp/2v5kv1381224807.ps tmp/2v5kv1381224807.png",intern=TRUE)) character(0) > try(system("convert tmp/3qdk21381224807.ps tmp/3qdk21381224807.png",intern=TRUE)) character(0) > try(system("convert tmp/4hwkg1381224807.ps tmp/4hwkg1381224807.png",intern=TRUE)) character(0) > try(system("convert tmp/531ix1381224807.ps tmp/531ix1381224807.png",intern=TRUE)) character(0) > try(system("convert tmp/6hegy1381224807.ps tmp/6hegy1381224807.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.011 0.636 3.631