R version 2.15.3 (2013-03-01) -- "Security Blanket" Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(557,561,549,532,526,511,499,555,565,542,527,510,514,517,508,493,490,469,478,528,534,518,506,502,516,528,533,536,537,524,536,587,597,581,564,558,575,580,575,563,552,537,545,601,604,586,564,549,551,556,548,540,531,521,519,572,581,563,548,539,541,562,559,546,536,528,530,582,599,584,571,563,565) > 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] 73 > (np <- floor(n / par1)) [1] 6 > 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] 7 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 557 514 516 575 551 541 565 [2,] 561 517 528 580 556 562 NA [3,] 549 508 533 575 548 559 NA [4,] 532 493 536 563 540 546 NA [5,] 526 490 537 552 531 536 NA [6,] 511 469 524 537 521 528 NA [7,] 499 478 536 545 519 530 NA [8,] 555 528 587 601 572 582 NA [9,] 565 534 597 604 581 599 NA [10,] 542 518 581 586 563 584 NA [11,] 527 506 564 564 548 571 NA [12,] 510 502 558 549 539 563 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/fisher/rcomp/tmp/16fsw1366627630.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/fisher/rcomp/tmp/2ljqk1366627630.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/fisher/rcomp/tmp/3cwub1366627630.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/fisher/rcomp/tmp/4bsl11366627630.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,] 514.0 517.0 508.0 532 526.0 511.0 478.0 528 534 518 506 502 [2,] 528.5 528.0 533.0 532 526.0 511.0 499.0 555 565 542 527 510 [3,] 551.0 558.5 548.5 538 533.5 522.5 524.5 577 589 572 556 544 [4,] 561.0 562.0 559.0 546 537.0 528.0 536.0 587 599 584 564 558 [5,] 575.0 580.0 575.0 563 552.0 537.0 545.0 601 604 586 571 563 $n [1] 7 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 531.5915 536.5689 531.7292 528.9695 526.4046 511.5345 500.6338 556.359 [2,] 570.4085 580.4311 565.2708 547.0305 540.5954 533.4655 548.3662 597.641 [,9] [,10] [,11] [,12] [1,] 567.0689 544.9086 532.1338 513.0384 [2,] 610.9311 599.0914 579.8662 574.9616 $out [1] 493 490 469 $group [1] 4 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(514, 528.5, 551, 561, 575, 517, 528, 558.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/59lk91366627630.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] [1,] 499.0 469.0 516.0 537.0 519.0 528.0 565 [2,] 518.5 491.5 530.5 550.5 535.0 538.5 565 [3,] 537.0 507.0 536.5 569.5 548.0 560.5 565 [4,] 556.0 517.5 572.5 583.0 559.5 576.5 565 [5,] 565.0 534.0 597.0 604.0 581.0 599.0 565 $n [1] 12 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 519.896 495.1412 517.3435 554.6765 536.8254 543.1679 565 [2,] 554.104 518.8588 555.6565 584.3235 559.1746 577.8321 565 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(499, 518.5, 537, 556, 565, 469, 491.5, 507, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/68am91366627630.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,] 20.85825 61.0 9.500 [2,] 23.34598 62.5 16.625 [3,] 24.61323 67.0 28.125 [4,] 25.72420 69.0 32.125 [5,] 27.41289 73.0 38.500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 23.52851 64.03531 21.05535 [2,] 25.69795 69.96469 35.19465 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(20.8582517643897, 23.3459760974735, 24.6132306374776, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/16fsw1366627630.ps tmp/16fsw1366627630.png",intern=TRUE)) character(0) > try(system("convert tmp/2ljqk1366627630.ps tmp/2ljqk1366627630.png",intern=TRUE)) character(0) > try(system("convert tmp/3cwub1366627630.ps tmp/3cwub1366627630.png",intern=TRUE)) character(0) > try(system("convert tmp/4bsl11366627630.ps tmp/4bsl11366627630.png",intern=TRUE)) character(0) > try(system("convert tmp/59lk91366627630.ps tmp/59lk91366627630.png",intern=TRUE)) character(0) > try(system("convert tmp/68am91366627630.ps tmp/68am91366627630.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.753 0.473 3.220