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(3221816.00 + ,3209817.00 + ,3197649.00 + ,3172468.00 + ,3421574.00 + ,3408392.00 + ,3221816.00 + ,3097770.00 + ,3109769.00 + ,3109769.00 + ,3123120.00 + ,3147118.00 + ,3184467.00 + ,3184467.00 + ,3160469.00 + ,3097770.00 + ,3421574.00 + ,3470922.00 + ,3396393.00 + ,3221816.00 + ,3296514.00 + ,3184467.00 + ,3234998.00 + ,3259165.00 + ,3284346.00 + ,3221816.00 + ,3234998.00 + ,3147118.00 + ,3421574.00 + ,3508271.00 + ,3433742.00 + ,3296514.00 + ,3445741.00 + ,3284346.00 + ,3433742.00 + ,3421574.00 + ,3458923.00 + ,3321695.00 + ,3470922.00 + ,3458923.00 + ,3682848.00 + ,3632317.00 + ,3433742.00 + ,3333694.00 + ,3470922.00 + ,3284346.00 + ,3421574.00 + ,3445741.00 + ,3496272.00 + ,3384394.00 + ,3445741.00 + ,3483090.00 + ,3620318.00 + ,3508271.00 + ,3359044.00 + ,3197649.00 + ,3347045.00 + ,2936375.00 + ,3135119.00 + ,3246997.00 + ,3359044.00 + ,3197649.00 + ,3197649.00 + ,3197649.00 + ,3284346.00 + ,3160469.00 + ,2997891.00 + ,2861846.00 + ,2960542.00 + ,2575222.00 + ,2811315.00 + ,2948543.00 + ,2973724.00 + ,2836496.00 + ,2848495.00 + ,2811315.00 + ,2936375.00 + ,2848495.00 + ,2675270.00 + ,2550041.00 + ,2761798.00 + ,2301949.00 + ,2600572.00 + ,2736617.00 + ,2736617.00 + ,2575222.00 + ,2425995.00 + ,2413996.00 + ,2550041.00 + ,2425995.00 + ,2190071.00 + ,2027493.00 + ,2202070.00 + ,1791569.00 + ,2164721.00 + ,2363296.00 + ,2425995.00 + ,2288767.00 + ,2115373.00 + ,2239419.00 + ,2288767.00 + ,2251418.00 + ,1878097.00 + ,1704872.00 + ,1828749.00 + ,1455597.00 + ,1840917.00 + ,1978145.00 + ,2090023.00 + ,1903447.00 + ,1728870.00 + ,1828749.00 + ,1878097.00 + ,1779401.00 + ,1406249.00 + ,1243671.00 + ,1392898.00 + ,982397.00 + ,1430247.00 + ,1704872.00) > 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] [,9] [1,] 3221816 3184467 3284346 3458923 3496272 3359044 2973724 2736617 2425995 [2,] 3209817 3184467 3221816 3321695 3384394 3197649 2836496 2575222 2288767 [3,] 3197649 3160469 3234998 3470922 3445741 3197649 2848495 2425995 2115373 [4,] 3172468 3097770 3147118 3458923 3483090 3197649 2811315 2413996 2239419 [5,] 3421574 3421574 3421574 3682848 3620318 3284346 2936375 2550041 2288767 [6,] 3408392 3470922 3508271 3632317 3508271 3160469 2848495 2425995 2251418 [7,] 3221816 3396393 3433742 3433742 3359044 2997891 2675270 2190071 1878097 [8,] 3097770 3221816 3296514 3333694 3197649 2861846 2550041 2027493 1704872 [9,] 3109769 3296514 3445741 3470922 3347045 2960542 2761798 2202070 1828749 [10,] 3109769 3184467 3284346 3284346 2936375 2575222 2301949 1791569 1455597 [11,] 3123120 3234998 3433742 3421574 3135119 2811315 2600572 2164721 1840917 [12,] 3147118 3259165 3421574 3445741 3246997 2948543 2736617 2363296 1978145 [,10] [,11] [1,] 2090023 NA [2,] 1903447 NA [3,] 1728870 NA [4,] 1828749 NA [5,] 1878097 NA [6,] 1779401 NA [7,] 1406249 NA [8,] 1243671 NA [9,] 1392898 NA [10,] 982397 NA [11,] 1430247 NA [12,] 1704872 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/1vjhf1439138582.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/2jgte1439138582.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/37yzn1439138582.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/449bg1439138582.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,] 2090023 1903447 1728870 1828749 1878097 1779401 1406249 1243671 1392898 [2,] 2736617 2575222 2425995 2413996 2550041 2425995 2190071 2027493 2202070 [3,] 3203142 3191058 3179059 3122444 3352960 3284430 3109854 2979808 3035156 [4,] 3359044 3221816 3234998 3197649 3421574 3508271 3396393 3221816 3347045 [5,] 3496272 3384394 3470922 3483090 3682848 3632317 3433742 3333694 3470922 [,10] [,11] [,12] [1,] 982397 1430247 1704872 [2,] 1791569 2164721 2363296 [3,] 2755798 2967218 3047830 [4,] 3184467 3234998 3259165 [5,] 3284346 3433742 3445741 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 2892152 2867994 2774849 2730900 2917507 2743682 2507127 2383077 2463080 [2,] 3514131 3514122 3583269 3513988 3788413 3825179 3712580 3576539 3607231 [,10] [,11] [,12] [1,] 2059851 2432464 2600219 [2,] 3451746 3501971 3495442 $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(2090023, 2736617, 3203141.5, 3359044, 3496272, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5x3mx1439138582.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,] 3097770 3097770 3147118 3284346 2936375 2575222 2550041 1791569 1455597 [2,] 3116444 3184467 3259672 3377634 3222323 2905194 2637921 2177396 1834833 [3,] 3185058 3228407 3359044 3452332 3371719 3079180 2786556 2388646 2046759 [4,] 3221816 3346454 3433742 3470922 3489681 3197649 2848495 2488018 2270092 [5,] 3221816 3470922 3508271 3470922 3620318 3359044 2973724 2736617 2425995 [,10] [,11] [1,] 982397 NA [2,] 1399574 NA [3,] 1716871 NA [4,] 1853423 NA [5,] 2090023 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3136998 3154524 3279650 3409783 3249775 2945790 2690512 2246969 1848234 [2,] 3233119 3302290 3438438 3494881 3493663 3212570 2882601 2530323 2245284 [,10] [,11] [1,] 1509867 NA [2,] 1923875 NA $out [1] 3421574 3408392 3682848 3632317 2301949 $group [1] 1 1 4 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(3097770, 3116444.5, 3185058.5, 3221816, 3221816, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/69pnw1439138582.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,] 468110.4 1406249 544475.8 [2,] 573736.4 1697605 686034.4 [3,] 630241.8 1828834 867920.6 [4,] 733408.7 2052758 1025027.2 [5,] 830053.8 2301949 1246628.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 557414.2 1666846 713303.7 [2,] 703069.4 1990821 1022537.6 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(468110.408673483, 573736.392728148, 630241.841117459, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1vjhf1439138582.ps tmp/1vjhf1439138582.png",intern=TRUE)) character(0) > try(system("convert tmp/2jgte1439138582.ps tmp/2jgte1439138582.png",intern=TRUE)) character(0) > try(system("convert tmp/37yzn1439138582.ps tmp/37yzn1439138582.png",intern=TRUE)) character(0) > try(system("convert tmp/449bg1439138582.ps tmp/449bg1439138582.png",intern=TRUE)) character(0) > try(system("convert tmp/5x3mx1439138582.ps tmp/5x3mx1439138582.png",intern=TRUE)) character(0) > try(system("convert tmp/69pnw1439138582.ps tmp/69pnw1439138582.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.165 0.406 2.597