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(91.27,91.51,91.78,91.83,92.01,92.1,92.35,92.46,93.08,93.38,93.46,93.58,93.74,94.18,94.43,94.53,94.66,94.8,95.04,95.29,95.42,95.64,95.82,96.01,96.16,96.4,96.87,97,97.26,97.42,97.64,97.93,98.1,98.29,98.42,98.49,98.67,99.1,99.37,99.54,99.58,99.77,100.06,100.26,100.57,100.94,101.03,101.12,101.26,101.94,102.26,102.51,102.61,102.76,103.04,103.22,103.47,103.64,103.76,103.85) > 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] 60 > (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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 91.27 93.74 96.16 98.67 101.26 NA [2,] 91.51 94.18 96.40 99.10 101.94 NA [3,] 91.78 94.43 96.87 99.37 102.26 NA [4,] 91.83 94.53 97.00 99.54 102.51 NA [5,] 92.01 94.66 97.26 99.58 102.61 NA [6,] 92.10 94.80 97.42 99.77 102.76 NA [7,] 92.35 95.04 97.64 100.06 103.04 NA [8,] 92.46 95.29 97.93 100.26 103.22 NA [9,] 93.08 95.42 98.10 100.57 103.47 NA [10,] 93.38 95.64 98.29 100.94 103.64 NA [11,] 93.46 95.82 98.42 101.03 103.76 NA [12,] 93.58 96.01 98.49 101.12 103.85 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/10x1k1458654581.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/2oqnn1458654581.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/3nghd1458654581.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/4sxui1458654581.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,] 91.27 91.51 91.78 91.83 92.01 92.10 92.35 92.46 93.08 93.38 [2,] 93.74 94.18 94.43 94.53 94.66 94.80 95.04 95.29 95.42 95.64 [3,] 96.16 96.40 96.87 97.00 97.26 97.42 97.64 97.93 98.10 98.29 [4,] 98.67 99.10 99.37 99.54 99.58 99.77 100.06 100.26 100.57 100.94 [5,] 101.26 101.94 102.26 102.51 102.61 102.76 103.04 103.22 103.47 103.64 [,11] [,12] [1,] 93.46 93.58 [2,] 95.82 96.01 [3,] 98.42 98.49 [4,] 101.03 101.12 [5,] 103.76 103.85 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.67647 92.92354 93.37941 93.45995 93.78354 93.90821 94.09288 [2,] 99.64353 99.87646 100.36059 100.54005 100.73646 100.93179 101.18712 [,8] [,9] [,10] [,11] [,12] [1,] 94.41821 94.46102 94.54503 94.73863 94.87929 [2,] 101.44179 101.73898 102.03497 102.10137 102.10071 $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(91.27, 93.74, 96.16, 98.67, 101.26, 91.51, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5nstq1458654581.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,] 91.270 93.74 96.160 98.670 101.260 NA [2,] 91.805 94.48 96.935 99.455 102.385 NA [3,] 92.225 94.92 97.530 99.915 102.900 NA [4,] 93.230 95.53 98.195 100.755 103.555 NA [5,] 93.580 96.01 98.490 101.120 103.850 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 91.57505 94.44109 96.95531 99.32206 102.3664 NA [2,] 92.87495 95.39891 98.10469 100.50794 103.4336 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(91.27, 91.805, 92.225, 93.23, 93.58, 93.74, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6w61u1458654581.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,] 4.056877 9.990 4.920 [2,] 4.080833 10.285 4.935 [3,] 4.099611 10.455 4.990 [4,] 4.165333 10.670 5.130 [5,] 4.190927 10.760 5.300 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4.061070 10.2794 4.901059 [2,] 4.138152 10.6306 5.078941 $out [1] 3.938928 $group [1] 1 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.05687687759932, 4.08083300414683, 4.09961127055268, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/10x1k1458654581.ps tmp/10x1k1458654581.png",intern=TRUE)) character(0) > try(system("convert tmp/2oqnn1458654581.ps tmp/2oqnn1458654581.png",intern=TRUE)) character(0) > try(system("convert tmp/3nghd1458654581.ps tmp/3nghd1458654581.png",intern=TRUE)) character(0) > try(system("convert tmp/4sxui1458654581.ps tmp/4sxui1458654581.png",intern=TRUE)) character(0) > try(system("convert tmp/5nstq1458654581.ps tmp/5nstq1458654581.png",intern=TRUE)) character(0) > try(system("convert tmp/6w61u1458654581.ps tmp/6w61u1458654581.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.125 0.402 2.550