R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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(29975,29124,29704,29564,30550,29812,30611,30577,30637,30944,30852,31216,31113,32073,31447,32293,31807,31778,31707,32135,31929,32923,33181,33435,34721,35179,35605,35931,35093,35053,35092,35295,35981,35606,35815,36144,36391,35642,36896,36399,38385,38226,38609,38227,38254,38047,38437,37963,38231,38283,38839,38833,39431,40091,40289,39433,38677,38107,38485,38464) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 5 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[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,] 29975 31113 34721 36391 38231 NA [2,] 29124 32073 35179 35642 38283 NA [3,] 29704 31447 35605 36896 38839 NA [4,] 29564 32293 35931 36399 38833 NA [5,] 30550 31807 35093 38385 39431 NA [6,] 29812 31778 35053 38226 40091 NA [7,] 30611 31707 35092 38609 40289 NA [8,] 30577 32135 35295 38227 39433 NA [9,] 30637 31929 35981 38254 38677 NA [10,] 30944 32923 35606 38047 38107 NA [11,] 30852 33181 35815 38437 38485 NA [12,] 31216 33435 36144 37963 38464 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -851 960 458 -749 52 NA [2,] 580 -626 426 1254 556 NA [3,] -140 846 326 -497 -6 NA [4,] 986 -486 -838 1986 598 NA [5,] -738 -29 -40 -159 660 NA [6,] 799 -71 39 383 198 NA [7,] -34 428 203 -382 -856 NA [8,] 60 -206 686 27 -756 NA [9,] 307 994 -375 -207 -570 NA [10,] -92 258 209 390 378 NA [11,] 364 254 329 -474 -21 NA [12,] -103 1286 247 268 NA NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/www/rcomp/tmp/1j7t31321391510.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/2q2i41321391510.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3yxee1321391510.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4lhzt1321391510.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,] 29975 29124 29704 29564 30550 29812 30611 30577 30637 30944 30852 31216 [2,] 31113 32073 31447 32293 31807 31778 31707 32135 31929 32923 33181 33435 [3,] 34721 35179 35605 35931 35093 35053 35092 35295 35981 35606 35815 36144 [4,] 36391 35642 36896 36399 38385 38226 38609 38227 38254 38047 38437 37963 [5,] 38231 38283 38839 38833 39431 40091 40289 39433 38677 38107 38485 38464 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 30991.58 32657.15 31754.75 33029.71 30445 30496.86 30215.06 30990.41 [2,] 38450.42 37700.85 39455.25 38832.29 39741 39609.14 39968.94 39599.59 [,9] [,10] [,11] [,12] [1,] 31511.77 31985.39 32101.12 32944.53 [2,] 40450.23 39226.61 39528.88 39343.47 $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(29975, 31113, 34721, 36391, 38231, 29124, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5g1na1321391510.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] -851 426 -497 -838 -159 -71 -856 -206 -570 209 -474 -103.0 [2,] -749 426 -140 -486 -159 39 -382 -206 -375 209 -21 72.0 [3,] 52 556 -6 598 -40 198 -34 27 -207 258 254 257.5 [4,] 458 580 326 986 -29 383 203 60 307 378 329 777.0 [5,] 960 580 846 1986 -29 799 428 60 994 390 364 1286.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -800.8632 447.184 -335.2744 -442.1115 -131.85767 -45.06953 -447.3595 [2,] 904.8632 664.816 323.2744 1638.1115 51.85767 441.06953 379.3595 [,8] [,9] [,10] [,11] [,12] [1,] -160.9549 -688.8995 138.5850 6.690882 -299.45 [2,] 214.9549 274.8995 377.4150 501.309118 814.45 $out [1] -626 1254 -738 660 686 -756 -92 $group [1] 2 2 5 5 8 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-851, -749, 52, 458, 960, 426, 426, 556, 580, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6gaa61321391510.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,] 29124.0 31113.0 34721.0 35642.0 38107.0 NA [2,] 29758.0 31742.5 35092.5 36647.5 38373.5 NA [3,] 30563.5 32001.0 35450.0 38136.5 38755.0 NA [4,] 30744.5 32608.0 35873.0 38319.5 39432.0 NA [5,] 31216.0 33435.0 36144.0 38609.0 40289.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 30113.55 31606.24 35094.01 37373.89 38272.21 NA [2,] 31013.45 32395.76 35805.99 38899.11 39237.79 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(29124, 29758, 30563.5, 30744.5, 31216, 31113, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/74qe41321391510.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 34060.2 34721.0 33752.00 [2,] 34551.1 35092.5 34258.75 [3,] 35074.4 35450.0 35093.75 [4,] 35197.5 35873.0 35333.00 [5,] 35444.4 36144.0 35809.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 34779.57 35094.01 34603.78 [2,] 35369.23 35805.99 35583.72 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(34060.2, 34551.1, 35074.4, 35197.5, 35444.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1j7t31321391510.ps tmp/1j7t31321391510.png",intern=TRUE)) character(0) > try(system("convert tmp/2q2i41321391510.ps tmp/2q2i41321391510.png",intern=TRUE)) character(0) > try(system("convert tmp/3yxee1321391510.ps tmp/3yxee1321391510.png",intern=TRUE)) character(0) > try(system("convert tmp/4lhzt1321391510.ps tmp/4lhzt1321391510.png",intern=TRUE)) character(0) > try(system("convert tmp/5g1na1321391510.ps tmp/5g1na1321391510.png",intern=TRUE)) character(0) > try(system("convert tmp/6gaa61321391510.ps tmp/6gaa61321391510.png",intern=TRUE)) character(0) > try(system("convert tmp/74qe41321391510.ps tmp/74qe41321391510.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.760 0.180 2.932