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(19064.00 + ,18993.00 + ,18921.00 + ,18772.00 + ,20246.00 + ,20168.00 + ,19064.00 + ,18330.00 + ,18401.00 + ,18401.00 + ,18480.00 + ,18622.00 + ,18843.00 + ,18843.00 + ,18701.00 + ,18330.00 + ,20246.00 + ,20538.00 + ,20097.00 + ,19064.00 + ,19506.00 + ,18843.00 + ,19142.00 + ,19285.00 + ,19434.00 + ,19064.00 + ,19142.00 + ,18622.00 + ,20246.00 + ,20759.00 + ,20318.00 + ,19506.00 + ,20389.00 + ,19434.00 + ,20318.00 + ,20246.00 + ,20467.00 + ,19655.00 + ,20538.00 + ,20467.00 + ,21792.00 + ,21493.00 + ,20318.00 + ,19726.00 + ,20538.00 + ,19434.00 + ,20246.00 + ,20389.00 + ,20688.00 + ,20026.00 + ,20389.00 + ,20610.00 + ,21422.00 + ,20759.00 + ,19876.00 + ,18921.00 + ,19805.00 + ,17375.00 + ,18551.00 + ,19213.00 + ,19876.00 + ,18921.00 + ,18921.00 + ,18921.00 + ,19434.00 + ,18701.00 + ,17739.00 + ,16934.00 + ,17518.00 + ,15238.00 + ,16635.00 + ,17447.00 + ,17596.00 + ,16784.00 + ,16855.00 + ,16635.00 + ,17375.00 + ,16855.00 + ,15830.00 + ,15089.00 + ,16342.00 + ,13621.00 + ,15388.00 + ,16193.00 + ,16193.00 + ,15238.00 + ,14355.00 + ,14284.00 + ,15089.00 + ,14355.00 + ,12959.00 + ,11997.00 + ,13030.00 + ,10601.00 + ,12809.00 + ,13984.00 + ,14355.00 + ,13543.00 + ,12517.00 + ,13251.00 + ,13543.00 + ,13322.00 + ,11113.00 + ,10088.00 + ,10821.00 + ,8613.00 + ,10893.00 + ,11705.00 + ,12367.00 + ,11263.00 + ,10230.00 + ,10821.00 + ,11113.00 + ,10529.00 + ,8321.00 + ,7359.00 + ,8242.00 + ,5813.00 + ,8463.00 + ,10088.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] [,10] [,11] [1,] 19064 18843 19434 20467 20688 19876 17596 16193 14355 12367 NA [2,] 18993 18843 19064 19655 20026 18921 16784 15238 13543 11263 NA [3,] 18921 18701 19142 20538 20389 18921 16855 14355 12517 10230 NA [4,] 18772 18330 18622 20467 20610 18921 16635 14284 13251 10821 NA [5,] 20246 20246 20246 21792 21422 19434 17375 15089 13543 11113 NA [6,] 20168 20538 20759 21493 20759 18701 16855 14355 13322 10529 NA [7,] 19064 20097 20318 20318 19876 17739 15830 12959 11113 8321 NA [8,] 18330 19064 19506 19726 18921 16934 15089 11997 10088 7359 NA [9,] 18401 19506 20389 20538 19805 17518 16342 13030 10821 8242 NA [10,] 18401 18843 19434 19434 17375 15238 13621 10601 8613 5813 NA [11,] 18480 19142 20318 20246 18551 16635 15388 12809 10893 8463 NA [12,] 18622 19285 20246 20389 19213 17447 16193 13984 11705 10088 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/1kuj51438967198.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/2jfwj1438967198.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/344xo1438967198.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/4728b1438967198.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] [1,] 12367.0 11263 10230 10821 11113 10529.0 8321.0 7359 8242.0 5813.0 [2,] 16193.0 15238 14355 14284 15089 14355.0 12959.0 11997 13030.0 10601.0 [3,] 18953.5 18882 18811 18476 19840 19434.5 18401.5 17632 17959.5 16306.5 [4,] 19876.0 19064 19142 18921 20246 20759.0 20097.0 19064 19805.0 18843.0 [5,] 20688.0 20026 20538 20610 21792 21493.0 20318.0 19726 20538.0 19434.0 [,11] [,12] [1,] 8463.0 10088.0 [2,] 12809.0 13984.0 [3,] 17557.5 18034.5 [4,] 19142.0 19285.0 [5,] 20318.0 20389.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 17113.33 16970.38 16419.22 16159.17 17263.36 16234.81 14835.07 14101.05 [2,] 20793.67 20793.62 21202.78 20792.83 22416.64 22634.19 21967.93 21162.95 [,9] [,10] [,11] [,12] [1,] 14574.44 12188.47 14393.28 15385.91 [2,] 21344.56 20424.53 20721.72 20683.09 $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(12367, 16193, 18953.5, 19876, 20688, 11263, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/54e9j1438967198.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] [1,] 18330.0 18330.0 18622 19434 17375 15238.0 15089.0 10601 8613.0 5813.0 [2,] 18440.5 18843.0 19288 19986 19067 17190.5 15609.0 12884 10857.0 8281.5 [3,] 18846.5 19103.0 19876 20428 19951 18220.0 16488.5 14134 12111.0 10159.0 [4,] 19064.0 19801.5 20318 20538 20649 18921.0 16855.0 14722 13432.5 10967.0 [5,] 19064.0 20538.0 20759 20538 21422 19876.0 17596.0 16193 14355.0 12367.0 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 18562.12 18665.82 19406.21 20176.23 19229.44 17430.71 15920.19 13295.68 [2,] 19130.88 19540.18 20345.79 20679.77 20672.56 19009.29 17056.81 14972.32 [,9] [,10] [,11] [1,] 10936.3 8934.125 NA [2,] 13285.7 11383.875 NA $out [1] 20246 20168 21792 21493 13621 $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(18330, 18440.5, 18846.5, 19064, 19064, 18330, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6mpjh1438967198.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,] 2769.884 8321.0 3221.750 [2,] 3394.890 10045.0 4059.375 [3,] 3729.242 10821.5 5135.625 [4,] 4339.696 12146.5 6065.250 [5,] 4911.561 13621.0 7376.500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3298.309 9862.992 4220.732 [2,] 4160.174 11780.008 6050.518 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(2769.88407499103, 3394.88989779969, 3729.24166341692, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1kuj51438967198.ps tmp/1kuj51438967198.png",intern=TRUE)) character(0) > try(system("convert tmp/2jfwj1438967198.ps tmp/2jfwj1438967198.png",intern=TRUE)) character(0) > try(system("convert tmp/344xo1438967198.ps tmp/344xo1438967198.png",intern=TRUE)) character(0) > try(system("convert tmp/4728b1438967198.ps tmp/4728b1438967198.png",intern=TRUE)) character(0) > try(system("convert tmp/54e9j1438967198.ps tmp/54e9j1438967198.png",intern=TRUE)) character(0) > try(system("convert tmp/6mpjh1438967198.ps tmp/6mpjh1438967198.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.298 0.445 2.763