R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(24,23,24,24,27,28,25,19,19,19,20,16,22,21,25,29,28,25,26,24,28,28,28,28,32,31,22,29,31,29,32,32,31,29,28,28,29,22,26,24,27,27,23,21,19,17,19,21,13,8,5,10,6,6,8,11,12,13,19,19,18) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 61 > (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 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 24 22 32 29 13 18 [2,] 23 21 31 22 8 NA [3,] 24 25 22 26 5 NA [4,] 24 29 29 24 10 NA [5,] 27 28 31 27 6 NA [6,] 28 25 29 27 6 NA [7,] 25 26 32 23 8 NA [8,] 19 24 32 21 11 NA [9,] 19 28 31 19 12 NA [10,] 19 28 29 17 13 NA [11,] 20 28 28 19 19 NA [12,] 16 28 28 21 19 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/www/html/rcomp/tmp/1q2qa1257949014.ps",horizontal=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/www/html/rcomp/tmp/2anag1257949014.ps",horizontal=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/www/html/rcomp/tmp/3os9s1257949014.ps",horizontal=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/www/html/rcomp/tmp/49aom1257949014.ps",horizontal=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,] 13 21 22 24 27 25 23 19 12 13 19 16 [2,] 18 21 22 24 27 25 23 19 19 17 19 19 [3,] 23 22 24 24 27 27 25 21 19 19 20 21 [4,] 29 23 25 29 28 28 26 24 28 28 28 28 [5,] 32 23 26 29 28 29 26 24 31 29 28 28 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 15.90464 20.58681 21.88021 20.46701 26.2934 24.88021 22.88021 17.46701 [2,] 30.09536 23.41319 26.11979 27.53299 27.7066 29.11979 27.11979 24.53299 [,9] [,10] [,11] [,12] [1,] 12.64062 11.22743 13.64062 14.64062 [2,] 25.35938 26.77257 26.35938 27.35938 $out [1] 31 8 5 10 31 6 6 32 8 32 11 $group [1] 2 2 3 4 5 5 6 7 7 8 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(13, 18, 23, 29, 32, 21, 21, 22, 23, 23, 22, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5m96r1257949014.ps",horizontal=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,] 16.0 21.0 28.0 17.0 5.0 18 [2,] 19.0 24.5 28.5 20.0 7.0 18 [3,] 23.5 27.0 30.0 22.5 10.5 18 [4,] 24.5 28.0 31.5 26.5 13.0 18 [5,] 28.0 29.0 32.0 29.0 19.0 18 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 20.99141 25.40363 28.63168 19.53531 7.76336 18 [2,] 26.00859 28.59637 31.36832 25.46469 13.23664 18 $out [1] 22 $group [1] 3 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(16, 19, 23.5, 24.5, 28, 21, 24.5, 27, 28, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6y9pz1257949014.ps",horizontal=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.764452 12.0 1 [2,] 6.999985 17.5 3 [3,] 7.726306 20.0 5 [4,] 8.831236 23.0 9 [5,] 10.084642 25.0 11 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 6.891061 17.49141 2.263360 [2,] 8.561552 22.50859 7.736640 $out [1] 9 $group [1] 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.76445169982864, 6.99998542266463, 7.72630649803208, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1q2qa1257949014.ps tmp/1q2qa1257949014.png") > system("convert tmp/2anag1257949014.ps tmp/2anag1257949014.png") > system("convert tmp/3os9s1257949014.ps tmp/3os9s1257949014.png") > system("convert tmp/49aom1257949014.ps tmp/49aom1257949014.png") > system("convert tmp/5m96r1257949014.ps tmp/5m96r1257949014.png") > system("convert tmp/6y9pz1257949014.ps tmp/6y9pz1257949014.png") > > > proc.time() user system elapsed 1.045 0.805 1.385