R version 3.2.4 Revised (2016-03-16 r70336) -- "Very Secure Dishes" Copyright (C) 2016 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(99,99,99,100,101,101,100,101,100,101,100,100,102,102,102,102,102,102,103,103,103,103,103,103,104,104,104,106,106,106,106,107,106,106,106,106,106,106,106,105,105,105,105,105,104,104,104,104,103,104,104,103,103,103,103,103,103,104,104,104,104,104,105,105,104,104,104,104,103) > 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] 69 > (np <- floor(n / par1)) [1] 5 > 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] 6 6 6 6 6 6 6 6 6 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 99 102 104 106 103 104 [2,] 99 102 104 106 104 104 [3,] 99 102 104 106 104 105 [4,] 100 102 106 105 103 105 [5,] 101 102 106 105 103 104 [6,] 101 102 106 105 103 104 [7,] 100 103 106 105 103 104 [8,] 101 103 107 105 103 104 [9,] 100 103 106 104 103 103 [10,] 101 103 106 104 104 NA [11,] 100 103 106 104 104 NA [12,] 100 103 106 104 104 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/1hf2k1458676797.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/2wlel1458676797.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/3kzyi1458676797.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/4nisz1458676797.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,] 99.0 99 99 100 101.0 101.0 100.0 101.0 103 103 103 103 [2,] 102.0 102 102 102 102.0 102.0 103.0 103.0 103 103 103 103 [3,] 103.5 104 104 104 103.5 103.5 103.5 103.5 103 104 104 104 [4,] 104.0 104 105 105 105.0 105.0 105.0 105.0 104 104 104 104 [5,] 106.0 106 106 106 106.0 106.0 106.0 107.0 104 104 104 104 $n [1] 6 6 6 6 6 6 6 6 6 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 102.2099 102.7099 102.0649 102.0649 101.5649 101.5649 102.2099 102.2099 [2,] 104.7901 105.2901 105.9351 105.9351 105.4351 105.4351 104.7901 104.7901 [,9] [,10] [,11] [,12] [1,] 102.355 103.2934 103.2934 103.2934 [2,] 103.645 104.7066 104.7066 104.7066 $out [1] 100 106 101 106 100 106 100 106 $group [1] 9 9 10 10 11 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(99, 102, 103.5, 104, 106, 99, 102, 104, 104, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/551f81458676797.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] [1,] 99.0 102.0 104 104.0 103 104 [2,] 99.5 102.0 105 104.0 103 104 [3,] 100.0 102.5 106 105.0 103 104 [4,] 101.0 103.0 106 105.5 104 104 [5,] 101.0 103.0 107 106.0 104 104 $n [1] 12 12 12 12 12 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 99.31584 102.0439 105.5439 104.3158 102.5439 104 [2,] 100.68416 102.9561 106.4561 105.6842 103.4561 104 $out [1] 105 105 103 $group [1] 6 6 6 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(99, 99.5, 100, 101, 101, 102, 102, 102.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6six61458676797.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,] 1.816590 5.0 0.750 [2,] 1.905809 5.5 1.000 [3,] 2.132267 6.0 1.750 [4,] 2.312375 6.5 2.375 [5,] 2.503331 7.0 2.750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.946830 5.543893 1.122853 [2,] 2.317704 6.456107 2.377147 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(1.81659021245849, 1.90580945522746, 2.13226718267672, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1hf2k1458676797.ps tmp/1hf2k1458676797.png",intern=TRUE)) character(0) > try(system("convert tmp/2wlel1458676797.ps tmp/2wlel1458676797.png",intern=TRUE)) character(0) > try(system("convert tmp/3kzyi1458676797.ps tmp/3kzyi1458676797.png",intern=TRUE)) character(0) > try(system("convert tmp/4nisz1458676797.ps tmp/4nisz1458676797.png",intern=TRUE)) character(0) > try(system("convert tmp/551f81458676797.ps tmp/551f81458676797.png",intern=TRUE)) character(0) > try(system("convert tmp/6six61458676797.ps tmp/6six61458676797.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.185 0.436 2.640