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(12117,11597,12291,12461,13469,13448,13896,13846,13159,13682,13083,13507,12545,12076,13181,13395,14108,14017,14464,14139,13393,13979,13538,13752,12729,12308,13663,13660,14367,14737,15155,15616,14738,14872,14551,15020,13884,13224,14771,14645,15960,16223,16073,16233,15210,15173,14696,15202,14492,14176,15634,16043,17448,16975,17055,17286,15987,16682,16243,16580) > 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,] 12117 12545 12729 13884 14492 NA [2,] 11597 12076 12308 13224 14176 NA [3,] 12291 13181 13663 14771 15634 NA [4,] 12461 13395 13660 14645 16043 NA [5,] 13469 14108 14367 15960 17448 NA [6,] 13448 14017 14737 16223 16975 NA [7,] 13896 14464 15155 16073 17055 NA [8,] 13846 14139 15616 16233 17286 NA [9,] 13159 13393 14738 15210 15987 NA [10,] 13682 13979 14872 15173 16682 NA [11,] 13083 13538 14551 14696 16243 NA [12,] 13507 13752 15020 15202 16580 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -520 -469 -421 -660 -316 NA [2,] 694 1105 1355 1547 1458 NA [3,] 170 214 -3 -126 409 NA [4,] 1008 713 707 1315 1405 NA [5,] -21 -91 370 263 -473 NA [6,] 448 447 418 -150 80 NA [7,] -50 -325 461 160 231 NA [8,] -687 -746 -878 -1023 -1299 NA [9,] 523 586 134 -37 695 NA [10,] -599 -441 -321 -477 -439 NA [11,] 424 214 469 506 337 NA [12,] -962 -1023 -1136 -710 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/1mrew1321392861.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/22pyv1321392861.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/3vilz1321392861.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/4sf1b1321392861.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,] 12117 11597 12291 12461 13469 13448 13896 13846 13159 13682 13083 13507 [2,] 12545 12076 13181 13395 14108 14017 14464 14139 13393 13979 13538 13752 [3,] 12729 12308 13663 13660 14367 14737 15155 15616 14738 14872 14551 15020 [4,] 13884 13224 14771 14645 15960 16223 16073 16233 15210 15173 14696 15202 [5,] 14492 14176 15634 16043 17448 16975 17055 17286 15987 16682 16243 16580 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 11782.87 11496.83 12539.51 12776.75 13058.38 13178.25 14018.08 14136.38 [2,] 13675.13 13119.17 14786.49 14543.25 15675.62 16295.75 16291.92 17095.62 [,9] [,10] [,11] [,12] [1,] 13454.11 14028.32 13732.76 13995.43 [2,] 16021.89 15715.68 15369.24 16044.57 $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(12117, 12545, 12729, 13884, 14492, 11597, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5hea81321392861.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,] -660 694 -126 707 -473 -150 -325 -1299 -37 -477 214 -1136.0 [2,] -520 1105 -3 713 -91 80 -50 -1023 134 -477 337 -1079.5 [3,] -469 1355 170 1008 -21 418 160 -878 523 -441 424 -992.5 [4,] -421 1458 214 1315 263 447 231 -746 586 -439 469 -836.0 [5,] -316 1547 409 1405 370 448 461 -687 695 -439 506 -710.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -538.9532 1105.571 16.66835 582.6283 -271.1355 158.6787 -38.55389 [2,] -399.0468 1604.429 323.33165 1433.3717 229.1355 677.3213 358.55389 [,8] [,9] [,10] [,11] [,12] [1,] -1073.7275 203.6179 -467.8507 330.7291 -1184.865 [2,] -682.2725 842.3821 -414.1493 517.2709 -800.135 $out [1] -599 -321 $group [1] 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-660, -520, -469, -421, -316, 694, 1105, 1355, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6im3k1321392861.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,] 11597.0 12545.0 12308.0 13224.0 14176.0 NA [2,] 12376.0 13287.0 13661.5 14670.5 15810.5 NA [3,] 13303.5 13645.0 14644.0 15187.5 16411.5 NA [4,] 13594.5 14062.5 14946.0 16016.5 17015.0 NA [5,] 13896.0 14464.0 15616.0 16233.0 17448.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 12747.73 13291.29 14058.13 14573.58 15862.12 NA [2,] 13859.27 13998.71 15229.87 15801.42 16960.88 NA $out [1] 12076 $group [1] 2 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(11597, 12376, 13303.5, 13594.5, 13896, 12545, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/735a11321392861.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,] 12676.2 12308.0 12650.00 [2,] 13974.4 13661.5 13998.00 [3,] 14654.8 14644.0 14389.25 [4,] 15075.2 14946.0 15077.00 [5,] 15424.0 15616.0 15268.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 14152.72 14058.13 13897.11 [2,] 15156.88 15229.87 14881.39 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(12676.2, 13974.4, 14654.8, 15075.2, 15424, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1mrew1321392861.ps tmp/1mrew1321392861.png",intern=TRUE)) character(0) > try(system("convert tmp/22pyv1321392861.ps tmp/22pyv1321392861.png",intern=TRUE)) character(0) > try(system("convert tmp/3vilz1321392861.ps tmp/3vilz1321392861.png",intern=TRUE)) character(0) > try(system("convert tmp/4sf1b1321392861.ps tmp/4sf1b1321392861.png",intern=TRUE)) character(0) > try(system("convert tmp/5hea81321392861.ps tmp/5hea81321392861.png",intern=TRUE)) character(0) > try(system("convert tmp/6im3k1321392861.ps tmp/6im3k1321392861.png",intern=TRUE)) character(0) > try(system("convert tmp/735a11321392861.ps tmp/735a11321392861.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.650 0.280 2.922