R version 3.0.1 (2013-05-16) -- "Good Sport" 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(3207324 + ,3178086 + ,3148485 + ,3087246 + ,3693267 + ,3661164 + ,3207324 + ,2905563 + ,2934699 + ,2934699 + ,2967168 + ,3025542 + ,3207324 + ,3148485 + ,3239325 + ,3388641 + ,4238049 + ,4238049 + ,4056732 + ,3874950 + ,4024266 + ,4205949 + ,4238049 + ,4328892 + ,4601499 + ,4419732 + ,4419732 + ,4692342 + ,5448042 + ,5509281 + ,5357202 + ,4993734 + ,5266260 + ,5266260 + ,5295495 + ,5448042 + ,5568120 + ,5629359 + ,5629359 + ,5811042 + ,6508356 + ,6689670 + ,6718809 + ,6264966 + ,6508356 + ,6417513 + ,6235746 + ,6628434 + ,6718809 + ,6566727 + ,6598830 + ,6809748 + ,7597920 + ,7990056 + ,7990056 + ,7808739 + ,8080980 + ,7808739 + ,7656276 + ,8233527 + ,8323902 + ,8110134 + ,8654901 + ,8868684 + ,9504309 + ,9926133 + ,9867774 + ,9835290 + ,10078677 + ,10049076 + ,9686076 + ,10230759 + ,10412541 + ,10230759 + ,10986462 + ,11349927 + ,12196086 + ,12529950 + ,12439476 + ,12257691 + ,12409872 + ,12591555 + ,11985168 + ,12468612 + ,12773337 + ,12650394 + ,13438098 + ,13710240 + ,14861511 + ,15072414 + ,14800254 + ,14952351 + ,15043194 + ,15134034 + ,14556783 + ,15101568 + ,15403311 + ,15101568 + ,15980562 + ,16252821 + ,17433111 + ,17614893 + ,17673267 + ,17977893 + ,17977893 + ,18097971 + ,17553189 + ,17825814 + ,18007131 + ,17673267 + ,18642738 + ,18824436 + ,20034063 + ,20247849 + ,20549592 + ,20822217 + ,20851353 + ,20883456 + ,20338689 + ,20883456) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3207324 3207324 4601499 5568120 6718809 8323902 10412541 12773337 [2,] 3178086 3148485 4419732 5629359 6566727 8110134 10230759 12650394 [3,] 3148485 3239325 4419732 5629359 6598830 8654901 10986462 13438098 [4,] 3087246 3388641 4692342 5811042 6809748 8868684 11349927 13710240 [5,] 3693267 4238049 5448042 6508356 7597920 9504309 12196086 14861511 [6,] 3661164 4238049 5509281 6689670 7990056 9926133 12529950 15072414 [7,] 3207324 4056732 5357202 6718809 7990056 9867774 12439476 14800254 [8,] 2905563 3874950 4993734 6264966 7808739 9835290 12257691 14952351 [9,] 2934699 4024266 5266260 6508356 8080980 10078677 12409872 15043194 [10,] 2934699 4205949 5266260 6417513 7808739 10049076 12591555 15134034 [11,] 2967168 4238049 5295495 6235746 7656276 9686076 11985168 14556783 [12,] 3025542 4328892 5448042 6628434 8233527 10230759 12468612 15101568 [,9] [,10] [,11] [1,] 15403311 18007131 NA [2,] 15101568 17673267 NA [3,] 15980562 18642738 NA [4,] 16252821 18824436 NA [5,] 17433111 20034063 NA [6,] 17614893 20247849 NA [7,] 17673267 20549592 NA [8,] 17977893 20822217 NA [9,] 17977893 20851353 NA [10,] 18097971 20883456 NA [11,] 17553189 20338689 NA [12,] 17825814 20883456 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/184jo1375885878.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/2kw6c1375885878.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/3632y1375885878.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/4841y1375885878.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] [1,] 3207324 3148485 3148485 3087246 3693267 3661164 3207324 2905563 [2,] 4601499 4419732 4419732 4692342 5448042 5509281 5357202 4993734 [3,] 7521356 7338430 7626866 7839216 8551114 8958094 8928915 8822014 [4,] 12773337 12650394 13438098 13710240 14861511 15072414 14800254 14952351 [5,] 18007131 17673267 18642738 18824436 20034063 20247849 20549592 20822217 [,9] [,10] [,11] [,12] [1,] 2934699 2934699 2967168 3025542 [2,] 5266260 5266260 5295495 5448042 [3,] 9079828 8928908 8671176 9232143 [4,] 15043194 15134034 14556783 15101568 [5,] 20851353 20883456 20338689 20883456 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3438379 3226064 3120930 3333515 3847770 4179972 4210790 3846292 [2,] 11604332 11450797 12132801 12344917 13254459 13736217 13647040 13797737 [,9] [,10] [,11] [,12] [1,] 4194882 3998574 4043867 4408857 [2,] 13964775 13859241 13298485 14055429 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(3207324, 4601499, 7521355.5, 12773337, 18007131, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/5swk01375885878.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] [1,] 2905563 3148485 4419732 5568120 6566727 8110134 10230759 12650394 [2,] 2950934 3313983 4646920 5720200 6764278 8761792 11168194 13574169 [3,] 3117866 4040499 5266260 6341240 7732508 9760683 12226888 14830882 [4,] 3207324 4238049 5402622 6568395 7990056 9987604 12454044 15057804 [5,] 3207324 4328892 5509281 6718809 8233527 10230759 12591555 15134034 [,9] [,10] [,11] [1,] 15101568 17673267 NA [2,] 16116692 18733587 NA [3,] 17584041 20293269 NA [4,] 17901854 20836785 NA [5,] 18097971 20883456 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3000924 3619026 4921579 5954372 7173422 9201582 11640404 14154187 [2,] 3234807 4461972 5610941 6728107 8291593 10319784 12813373 15507578 [,9] [,10] [,11] [1,] 16769817 19333986 NA [2,] 18398265 21252552 NA $out [1] 3693267 3661164 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(2905563, 2950933.5, 3117865.5, 3207324, 3207324, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/6fu821375885878.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,] 5092468 14524782 7323346 [2,] 5512488 15615722 8125598 [3,] 5848083 16964476 8497245 [4,] 6062869 17887284 8754134 [5,] 6162544 17948757 8967144 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 5597051 15928402 8210565 [2,] 6099116 18000551 8783925 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(5092468.42254246, 5512488.00575517, 5848083.28697911, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/184jo1375885878.ps tmp/184jo1375885878.png",intern=TRUE)) character(0) > try(system("convert tmp/2kw6c1375885878.ps tmp/2kw6c1375885878.png",intern=TRUE)) character(0) > try(system("convert tmp/3632y1375885878.ps tmp/3632y1375885878.png",intern=TRUE)) character(0) > try(system("convert tmp/4841y1375885878.ps tmp/4841y1375885878.png",intern=TRUE)) character(0) > try(system("convert tmp/5swk01375885878.ps tmp/5swk01375885878.png",intern=TRUE)) character(0) > try(system("convert tmp/6fu821375885878.ps tmp/6fu821375885878.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.812 0.669 3.465