R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 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(112,118,132,129,121,135,148,148,136,119,104,118,115,126,141,135,125,149,170,170,158,133,114,140,145,150,178,163,172,178,199,199,184,162,146,166,171,180,193,181,183,218,230,242,209,191,172,194,196,196,236,235,229,243,264,272,237,211,180,201,254,200,165,123,162,145,145,161,155,173,160,47,232,143,161,159,243,192,157,143,221,227,132,41,273,182,188,162,140,186,178,236,202,184,119,16,340,151,240,235,174,309,174,207,209,171,117,10,339,139,186,155,153,222,102,107,188,162,185,24,394,209,248,254,202,258,215,309,240,258,276,48,455,345,311,346,310,297,300,274,292,304,186,14,321,206,160,217,204,246,234,175,364,328,158,40,556,193,221,278,230,253,240,252,228,306,206,48,557,279,399,364,306,471,293,333,316,329,265,61,679,428,394,352,387,590,177,199,203,255,261,115) > 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] 192 > (np <- floor(n / par1)) [1] 16 > 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] 16 16 16 16 16 16 16 16 16 16 16 16 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 112 115 145 171 196 254 232 273 340 339 394 455 321 [2,] 118 126 150 180 196 200 143 182 151 139 209 345 206 [3,] 132 141 178 193 236 165 161 188 240 186 248 311 160 [4,] 129 135 163 181 235 123 159 162 235 155 254 346 217 [5,] 121 125 172 183 229 162 243 140 174 153 202 310 204 [6,] 135 149 178 218 243 145 192 186 309 222 258 297 246 [7,] 148 170 199 230 264 145 157 178 174 102 215 300 234 [8,] 148 170 199 242 272 161 143 236 207 107 309 274 175 [9,] 136 158 184 209 237 155 221 202 209 188 240 292 364 [10,] 119 133 162 191 211 173 227 184 171 162 258 304 328 [11,] 104 114 146 172 180 160 132 119 117 185 276 186 158 [12,] 118 140 166 194 201 47 41 16 10 24 48 14 40 [,14] [,15] [,16] [,17] [1,] 556 557 679 NA [2,] 193 279 428 NA [3,] 221 399 394 NA [4,] 278 364 352 NA [5,] 230 306 387 NA [6,] 253 471 590 NA [7,] 240 293 177 NA [8,] 252 333 199 NA [9,] 228 316 203 NA [10,] 306 329 255 NA [11,] 206 265 261 NA [12,] 48 61 115 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/1lcu91426158061.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/23di71426158061.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/3pg5l1426158061.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/4ly241426158061.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,] 112.0 118.0 132.0 123 121.0 135.0 102.0 107.0 136.0 119.0 104.0 10 [2,] 183.5 146.5 163.0 157 157.5 182.0 163.5 165.5 186.0 166.5 125.5 32 [3,] 297.0 187.5 190.5 199 192.5 232.5 188.5 203.0 209.0 201.0 166.0 48 [4,] 424.5 207.5 244.0 266 236.5 277.5 237.0 262.0 238.5 281.0 196.0 129 [5,] 679.0 279.0 311.0 364 310.0 309.0 300.0 333.0 316.0 329.0 276.0 201 $n [1] 16 16 16 16 16 16 16 16 16 16 16 16 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 201.805 163.405 158.505 155.945 161.295 194.7775 159.4675 164.8825 [2,] 392.195 211.595 222.495 242.055 223.705 270.2225 217.5325 241.1175 [,9] [,10] [,11] [,12] [1,] 188.2625 155.7725 138.1525 9.685 [2,] 229.7375 246.2275 193.8475 86.315 $out [1] 345 428 399 394 387 471 590 364 $group [1] 2 2 3 3 5 6 6 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(112, 183.5, 297, 424.5, 679, 118, 146.5, 187.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5hbik1426158061.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] [,10] [,11] [,12] [,13] [1,] 104.0 114.0 145 171.0 180.0 123.0 41 119 117.0 102.0 202 274 40.0 [2,] 118.0 125.5 156 180.5 198.5 145.0 143 151 161.0 123.0 212 283 167.5 [3,] 125.0 137.5 169 192.0 232.0 160.5 160 183 190.5 158.5 251 302 211.5 [4,] 135.5 153.5 181 213.5 240.0 169.0 224 195 237.5 187.0 267 328 283.5 [5,] 148.0 170.0 199 242.0 272.0 200.0 243 236 340.0 222.0 309 346 364.0 [,14] [,15] [,16] [,17] [1,] 193.0 265.0 115.0 NA [2,] 213.5 286.0 201.0 NA [3,] 235.0 322.5 306.5 NA [4,] 265.5 381.5 411.0 NA [5,] 306.0 471.0 679.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 117.0181 124.729 157.5973 176.9485 213.0716 149.5534 123.0554 162.9313 [2,] 132.9819 150.271 180.4027 207.0515 250.9284 171.4466 196.9446 203.0687 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 155.6078 129.3092 225.9141 281.4752 158.5916 211.2825 278.9418 210.7176 [2,] 225.3922 187.6908 276.0859 322.5248 264.4084 258.7175 366.0582 402.2824 [,17] [1,] NA [2,] NA $out [1] 254 47 273 16 10 339 24 394 48 455 186 14 556 48 557 61 $group [1] 6 6 8 8 9 10 10 11 11 12 12 12 14 14 15 15 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" NA Warning message: In bxp(list(stats = c(104, 118, 125, 135.5, 148, 114, 125.5, 137.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6yaxe1426158061.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,] 54.98875 172.0 50.750 [2,] 61.79137 204.0 65.500 [3,] 71.51486 234.5 80.875 [4,] 82.62799 288.5 95.000 [5,] 83.30684 310.0 102.000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 62.01114 195.959 67.41985 [2,] 81.01858 273.041 94.33015 $out [1] 169.8993 120.7319 567.0000 455.0000 219.5000 $group [1] 1 1 2 2 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(54.9887488491964, 61.7913729304936, 71.5148573737071, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1lcu91426158061.ps tmp/1lcu91426158061.png",intern=TRUE)) character(0) > try(system("convert tmp/23di71426158061.ps tmp/23di71426158061.png",intern=TRUE)) character(0) > try(system("convert tmp/3pg5l1426158061.ps tmp/3pg5l1426158061.png",intern=TRUE)) character(0) > try(system("convert tmp/4ly241426158061.ps tmp/4ly241426158061.png",intern=TRUE)) character(0) > try(system("convert tmp/5hbik1426158061.ps tmp/5hbik1426158061.png",intern=TRUE)) character(0) > try(system("convert tmp/6yaxe1426158061.ps tmp/6yaxe1426158061.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.102 0.385 2.510