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(90.18,90.5,90.63,90.75,90.76,90.67,90.5,90.8,91.22,92.19,92.51,92.67,93.75,94.1,94.96,95.21,95.33,95.43,95.44,95.64,95.8,95.87,95.98,96.07,96.23,96.32,96.55,96.73,96.61,96.64,96.86,97.02,97.22,98.1,98.46,98.6,98.78,99.13,99.48,99.62,99.68,99.95,100.12,100.25,100.47,100.7,100.88,100.95,100.92,101.12,101.19,101.28,101.28,101.3,101.3,101.36,101.45,101.58,101.73,101.84,102.01,102.14,102.16,102.32,102.41,102.4,102.43,102.42,102.3,102.65,102.72,102.86) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 90.18 93.75 96.23 98.78 100.92 102.01 NA [2,] 90.50 94.10 96.32 99.13 101.12 102.14 NA [3,] 90.63 94.96 96.55 99.48 101.19 102.16 NA [4,] 90.75 95.21 96.73 99.62 101.28 102.32 NA [5,] 90.76 95.33 96.61 99.68 101.28 102.41 NA [6,] 90.67 95.43 96.64 99.95 101.30 102.40 NA [7,] 90.50 95.44 96.86 100.12 101.30 102.43 NA [8,] 90.80 95.64 97.02 100.25 101.36 102.42 NA [9,] 91.22 95.80 97.22 100.47 101.45 102.30 NA [10,] 92.19 95.87 98.10 100.70 101.58 102.65 NA [11,] 92.51 95.98 98.46 100.88 101.73 102.72 NA [12,] 92.67 96.07 98.60 100.95 101.84 102.86 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/1daxg1458647321.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/2mn4s1458647321.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/3oeka1458647321.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/462y21458647321.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,] 90.180 90.500 90.630 90.750 90.760 90.670 90.50 90.800 91.220 [2,] 93.750 94.100 94.960 95.210 95.330 95.430 95.44 95.640 95.800 [3,] 97.505 97.725 98.015 98.175 98.145 98.295 98.49 98.635 98.845 [4,] 100.920 101.120 101.190 101.280 101.280 101.300 101.30 101.360 101.450 [5,] 102.010 102.140 102.160 102.320 102.410 102.400 102.43 102.420 102.300 [,10] [,11] [,12] [1,] 92.19 92.51 92.670 [2,] 95.87 95.98 96.070 [3,] 99.40 99.67 99.775 [4,] 101.58 101.73 101.840 [5,] 102.65 102.72 102.860 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.88012 93.19687 93.99645 94.25965 94.30706 94.50866 94.71011 [2,] 102.12988 102.25313 102.03355 102.09035 101.98294 102.08134 102.26989 [,8] [,9] [,10] [,11] [,12] [1,] 94.94542 95.20057 95.71687 95.96106 96.05316 [2,] 102.32458 102.48943 103.08313 103.37894 103.49684 $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(90.18, 93.75, 97.505, 100.92, 102.01, 90.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5vaph1458647321.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] [1,] 90.180 94.100 96.230 98.780 100.920 102.010 NA [2,] 90.565 95.085 96.580 99.550 101.235 102.230 NA [3,] 90.755 95.435 96.795 100.035 101.300 102.405 NA [4,] 91.705 95.835 97.660 100.585 101.515 102.540 NA [5,] 92.670 96.070 98.600 100.950 101.840 102.860 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 90.23504 95.09292 96.3024 99.56293 101.1723 102.2636 NA [2,] 91.27496 95.77708 97.2876 100.50707 101.4277 102.5464 NA $out [1] 93.75 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(90.18, 90.565, 90.755, 91.705, 92.67, 94.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6ca8j1458647321.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,] 3.883593 10.190 4.91500 [2,] 4.076538 10.770 4.99125 [3,] 4.332316 11.595 5.22000 [4,] 4.410894 11.690 5.34000 [5,] 4.501108 11.930 5.40500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4.179814 11.17538 5.060933 [2,] 4.484818 12.01462 5.379067 $out [1] 6.0150 5.9675 $group [1] 3 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(3.88359326740928, 4.0765375287119, 4.33231605488815, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1daxg1458647321.ps tmp/1daxg1458647321.png",intern=TRUE)) character(0) > try(system("convert tmp/2mn4s1458647321.ps tmp/2mn4s1458647321.png",intern=TRUE)) character(0) > try(system("convert tmp/3oeka1458647321.ps tmp/3oeka1458647321.png",intern=TRUE)) character(0) > try(system("convert tmp/462y21458647321.ps tmp/462y21458647321.png",intern=TRUE)) character(0) > try(system("convert tmp/5vaph1458647321.ps tmp/5vaph1458647321.png",intern=TRUE)) character(0) > try(system("convert tmp/6ca8j1458647321.ps tmp/6ca8j1458647321.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.092 0.379 2.500