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(133448.00 + ,132951.00 + ,132447.00 + ,131404.00 + ,141722.00 + ,141176.00 + ,133448.00 + ,128310.00 + ,128807.00 + ,128807.00 + ,129360.00 + ,130354.00 + ,131901.00 + ,131901.00 + ,130907.00 + ,128310.00 + ,141722.00 + ,143766.00 + ,140679.00 + ,133448.00 + ,136542.00 + ,131901.00 + ,133994.00 + ,134995.00 + ,136038.00 + ,133448.00 + ,133994.00 + ,130354.00 + ,141722.00 + ,145313.00 + ,142226.00 + ,136542.00 + ,142723.00 + ,136038.00 + ,142226.00 + ,141722.00 + ,143269.00 + ,137585.00 + ,143766.00 + ,143269.00 + ,152544.00 + ,150451.00 + ,142226.00 + ,138082.00 + ,143766.00 + ,136038.00 + ,141722.00 + ,142723.00 + ,144816.00 + ,140182.00 + ,142723.00 + ,144270.00 + ,149954.00 + ,145313.00 + ,139132.00 + ,132447.00 + ,138635.00 + ,121625.00 + ,129857.00 + ,134491.00 + ,139132.00 + ,132447.00 + ,132447.00 + ,132447.00 + ,136038.00 + ,130907.00 + ,124173.00 + ,118538.00 + ,122626.00 + ,106666.00 + ,116445.00 + ,122129.00 + ,123172.00 + ,117488.00 + ,117985.00 + ,116445.00 + ,121625.00 + ,117985.00 + ,110810.00 + ,105623.00 + ,114394.00 + ,95347.00 + ,107716.00 + ,113351.00 + ,113351.00 + ,106666.00 + ,100485.00 + ,99988.00 + ,105623.00 + ,100485.00 + ,90713.00 + ,83979.00 + ,91210.00 + ,74207.00 + ,89663.00 + ,97888.00 + ,100485.00 + ,94801.00 + ,87619.00 + ,92757.00 + ,94801.00 + ,93254.00 + ,77791.00 + ,70616.00 + ,75747.00 + ,60291.00 + ,76251.00 + ,81935.00 + ,86569.00 + ,78841.00 + ,71610.00 + ,75747.00 + ,77791.00 + ,73703.00 + ,58247.00 + ,51513.00 + ,57694.00 + ,40691.00 + ,59241.00 + ,70616.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] [1,] 133448 131901 136038 143269 144816 139132 123172 113351 100485 86569 [2,] 132951 131901 133448 137585 140182 132447 117488 106666 94801 78841 [3,] 132447 130907 133994 143766 142723 132447 117985 100485 87619 71610 [4,] 131404 128310 130354 143269 144270 132447 116445 99988 92757 75747 [5,] 141722 141722 141722 152544 149954 136038 121625 105623 94801 77791 [6,] 141176 143766 145313 150451 145313 130907 117985 100485 93254 73703 [7,] 133448 140679 142226 142226 139132 124173 110810 90713 77791 58247 [8,] 128310 133448 136542 138082 132447 118538 105623 83979 70616 51513 [9,] 128807 136542 142723 143766 138635 122626 114394 91210 75747 57694 [10,] 128807 131901 136038 136038 121625 106666 95347 74207 60291 40691 [11,] 129360 133994 142226 141722 129857 116445 107716 89663 76251 59241 [12,] 130354 134995 141722 142723 134491 122129 113351 97888 81935 70616 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/1kymy1439715337.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/2mcpp1439715337.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/3fsey1439715337.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/40alb1439715337.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,] 86569.0 78841 71610 75747 77791 73703.0 58247.0 51513 57694.0 [2,] 113351.0 106666 100485 99988 105623 100485.0 90713.0 83979 91210.0 [3,] 132674.5 132174 131677 129332 138880 136041.5 128810.5 123424 125716.5 [4,] 139132.0 133448 133994 132447 141722 145313.0 140679.0 133448 138635.0 [5,] 144816.0 140182 143766 144270 152544 150451.0 142226.0 138082 143766.0 [,10] [,11] [,12] [1,] 40691.0 59241.0 70616.0 [2,] 74207.0 89663.0 97888.0 [3,] 114145.5 122902.5 126241.5 [4,] 131901.0 133994.0 134995.0 [5,] 136038.0 142226.0 142723.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,] 119793.3 118792.6 114934.6 113114.2 120843.5 113643.6 103845.5 98707.32 [2,] 145555.7 145555.4 148419.4 145549.8 156916.5 158439.4 153775.5 148140.68 [,9] [,10] [,11] [,12] [1,] 102021.1 85319.28 100753 107701.4 [2,] 149411.9 142971.72 145052 144781.6 $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(86569, 113351, 132674.5, 139132, 144816, 78841, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5vh631439715337.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,] 128310.0 128310.0 130354 136038 121625 106666.0 105623.0 74207 60291.0 [2,] 129083.5 131901.0 135016 139902 133469 120333.5 109263.0 90188 75999.0 [3,] 131925.5 133721.0 139132 142996 139657 127540.0 115419.5 98938 84777.0 [4,] 133448.0 138610.5 142226 143766 144543 132447.0 117985.0 103054 94027.5 [5,] 133448.0 143766.0 145313 143766 149954 139132.0 123172.0 113351 100485.0 [,10] [,11] [1,] 40691.0 NA [2,] 57970.5 NA [3,] 71113.0 NA [4,] 76769.0 NA [5,] 86569.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 129934.8 130660.8 135843.5 141233.6 134606.1 122015 111441.3 93069.73 [2,] 133916.2 136781.2 142420.5 144758.4 144707.9 133065 119397.7 104806.27 [,9] [,10] [,11] [1,] 76554.08 62538.88 NA [2,] 92999.92 79687.12 NA $out [1] 141722 141176 152544 150451 95347 $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(128310, 129083.5, 131925.5, 133448, 133448, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6201e1439715337.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,] 19389.19 58247.0 22552.25 [2,] 23764.23 70315.0 28415.62 [3,] 26104.69 75750.5 35949.38 [4,] 30377.87 85025.5 42456.75 [5,] 34380.93 95347.0 51635.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 23088.16 69040.94 29545.12 [2,] 29121.22 82460.06 42353.63 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(19389.1885249372, 23764.2292845978, 26104.6916439184, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1kymy1439715337.ps tmp/1kymy1439715337.png",intern=TRUE)) character(0) > try(system("convert tmp/2mcpp1439715337.ps tmp/2mcpp1439715337.png",intern=TRUE)) character(0) > try(system("convert tmp/3fsey1439715337.ps tmp/3fsey1439715337.png",intern=TRUE)) character(0) > try(system("convert tmp/40alb1439715337.ps tmp/40alb1439715337.png",intern=TRUE)) character(0) > try(system("convert tmp/5vh631439715337.ps tmp/5vh631439715337.png",intern=TRUE)) character(0) > try(system("convert tmp/6201e1439715337.ps tmp/6201e1439715337.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.196 0.365 2.578