R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 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(169701,164182,161914,159612,151001,158114,186530,187069,174330,169362,166827,178037,186412,189226,191563,188906,186005,195309,223532,226899,214126,206903,204442,220376,214320,212588,205816,202196,195722,198563,229139,229527,211868,203555,195770,199834,203089,198480,192684,187827,182414,182510,211524,211451,200140,191568,186424,191987,203583,201920,195978,191395,188222,189422,214419,224325,216222,210506,207221,210027,215191,215177,211701,210176,205491,206996,235980,241292,236675,229127,225436,229570,239973,236168,230703,224790,217811,219576,245472,248511,242084,235572,229827,229697) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 169701 186412 214320 203089 203583 215191 239973 NA [2,] 164182 189226 212588 198480 201920 215177 236168 NA [3,] 161914 191563 205816 192684 195978 211701 230703 NA [4,] 159612 188906 202196 187827 191395 210176 224790 NA [5,] 151001 186005 195722 182414 188222 205491 217811 NA [6,] 158114 195309 198563 182510 189422 206996 219576 NA [7,] 186530 223532 229139 211524 214419 235980 245472 NA [8,] 187069 226899 229527 211451 224325 241292 248511 NA [9,] 174330 214126 211868 200140 216222 236675 242084 NA [10,] 169362 206903 203555 191568 210506 229127 235572 NA [11,] 166827 204442 195770 186424 207221 225436 229827 NA [12,] 178037 220376 199834 191987 210027 229570 229697 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -5519 2814 -1732 -4609 -1663 -14 -3805 NA [2,] -2268 2337 -6772 -5796 -5942 -3476 -5465 NA [3,] -2302 -2657 -3620 -4857 -4583 -1525 -5913 NA [4,] -8611 -2901 -6474 -5413 -3173 -4685 -6979 NA [5,] 7113 9304 2841 96 1200 1505 1765 NA [6,] 28416 28223 30576 29014 24997 28984 25896 NA [7,] 539 3367 388 -73 9906 5312 3039 NA [8,] -12739 -12773 -17659 -11311 -8103 -4617 -6427 NA [9,] -4968 -7223 -8313 -8572 -5716 -7548 -6512 NA [10,] -2535 -2461 -7785 -5144 -3285 -3691 -5745 NA [11,] 11210 15934 4064 5563 2806 4134 -130 NA [12,] 8375 -6056 3255 11596 5164 10403 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/wessaorg/rcomp/tmp/161z41452255306.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/wessaorg/rcomp/tmp/2wxp71452255306.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/wessaorg/rcomp/tmp/366kg1452255306.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/wessaorg/rcomp/tmp/4gq5a1452255306.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] [1,] 169701.0 164182.0 191563.0 187827.0 182414.0 182510.0 186530.0 211451.0 [2,] 194750.5 193853.0 192123.5 188366.5 184209.5 185966.0 212971.5 217888.0 [3,] 203583.0 201920.0 195978.0 191395.0 188222.0 195309.0 223532.0 226899.0 [4,] 214755.5 213882.5 208758.5 206186.0 200606.5 202779.5 232559.5 235409.5 [5,] 239973.0 236168.0 230703.0 224790.0 217811.0 219576.0 245472.0 248511.0 [,9] [,10] [,11] [,12] [1,] 200140.0 169362.0 166827.0 178037.0 [2,] 206004.0 197561.5 191097.0 195910.5 [3,] 214126.0 206903.0 204442.0 210027.0 [4,] 226448.5 219816.5 216328.5 224973.0 [5,] 242084.0 235572.0 229827.0 229697.0 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 191636.3 189958.7 186043.8 180753.5 178430 185268.2 211834.4 216435.4 [2,] 215529.7 213881.3 205912.2 202036.5 198014 205349.8 235229.6 237362.6 [,9] [,10] [,11] [,12] [1,] 201916.9 193612.7 189374.2 192671.3 [2,] 226335.1 220193.3 219509.8 227382.7 $out [1] 161914 159612 151001 158114 187069 174330 $group [1] 3 4 5 6 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(169701, 194750.5, 203583, 214755.5, 239973, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ye2p1452255306.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] [1,] -5519.0 -6772 -5913.0 -8611.0 96.0 24997.0 -73.0 -17659 -8572.0 -7785.0 [2,] -4207.0 -5869 -4720.0 -6726.5 1352.5 27059.5 463.5 -12756 -7930.5 -5444.5 [3,] -1732.0 -5465 -3620.0 -5413.0 1765.0 28416.0 3039.0 -11311 -7223.0 -3691.0 [4,] -838.5 -2872 -2479.5 -3929.0 4977.0 28999.0 4339.5 -7265 -6114.0 -2910.0 [5,] 2814.0 -2268 -1525.0 -2901.0 9304.0 30576.0 9906.0 -4617 -4968.0 -2461.0 [,11] [,12] [1,] -130.0 -6056.0 [2,] 3435.0 3255.0 [3,] 4134.0 6769.5 [4,] 8386.5 10403.0 [5,] 11210.0 11596.0 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3743.6139 -7254.76 -4957.99 -7083.622 -399.4929 27257.76 724.3153 [2,] 279.6139 -3675.24 -2282.01 -3742.378 3929.4929 29574.24 5353.6847 [,8] [,9] [,10] [,11] [,12] [1,] -14590.137 -8307.784 -5204.563 1177.044 2158.809 [2,] -8031.863 -6138.216 -2177.437 7090.956 11380.191 $out [1] 2337 15934 $group [1] 2 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-5519, -4207, -1732, -838.5, 2814, -6772, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6idbf1452255306.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] [,8] [1,] 151001.0 186005.0 195722.0 182414.0 188222.0 205491.0 217811.0 NA [2,] 160763.0 189066.0 199198.5 187125.5 193686.5 210938.5 227243.5 NA [3,] 168094.5 199875.5 204685.5 192335.5 205402.0 220313.5 233137.5 NA [4,] 176183.5 217251.0 213454.0 201614.5 212462.5 232775.0 241028.5 NA [5,] 187069.0 226899.0 229527.0 211524.0 224325.0 241292.0 248511.0 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 161061.1 187020.1 198183.5 185727 196838.1 210353.7 226850.1 NA [2,] 175127.9 212730.9 211187.5 198944 213965.9 230273.3 239424.9 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(151001, 160763, 168094.5, 176183.5, 187069, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7v1h71452255306.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,] 189523.7 188222.0 192408.0 [2,] 196804.4 195643.5 198858.6 [3,] 203572.1 204012.5 204310.4 [4,] 211069.5 212076.5 213334.0 [5,] 224153.4 226899.0 226648.8 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 197065.7 196517.3 197708.1 [2,] 210078.6 211507.7 210912.7 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(189523.714285714, 196804.357142857, 203572.142857143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/161z41452255306.ps tmp/161z41452255306.png",intern=TRUE)) character(0) > try(system("convert tmp/2wxp71452255306.ps tmp/2wxp71452255306.png",intern=TRUE)) character(0) > try(system("convert tmp/366kg1452255306.ps tmp/366kg1452255306.png",intern=TRUE)) character(0) > try(system("convert tmp/4gq5a1452255306.ps tmp/4gq5a1452255306.png",intern=TRUE)) character(0) > try(system("convert tmp/5ye2p1452255306.ps tmp/5ye2p1452255306.png",intern=TRUE)) character(0) > try(system("convert tmp/6idbf1452255306.ps tmp/6idbf1452255306.png",intern=TRUE)) character(0) > try(system("convert tmp/7v1h71452255306.ps tmp/7v1h71452255306.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.645 0.555 3.248