R version 2.12.1 (2010-12-16) 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(127800,127700,128500,129400,128800,128800,131300,131100,131500,132900,133500,133400,134828,136488,135943,138717,139223,139869,140507,140259,139220,144033,144683,147354,148813,152657,155912,155271,161382,162106,164825,162810,163398,164844,165910,165774,164881,164861,165501,164334,162229,162748,163915,160890,159779,161106,160659,160007,158917,159052,159507,159107,159925,161327,159957,156997,159316,159793,161383,161828,162887,164071,163810,166708,168481,169913,169602,170559,170943) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 69 > (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] 6 6 6 6 6 6 6 6 6 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 127800 134828 148813 164881 158917 162887 [2,] 127700 136488 152657 164861 159052 164071 [3,] 128500 135943 155912 165501 159507 163810 [4,] 129400 138717 155271 164334 159107 166708 [5,] 128800 139223 161382 162229 159925 168481 [6,] 128800 139869 162106 162748 161327 169913 [7,] 131300 140507 164825 163915 159957 169602 [8,] 131100 140259 162810 160890 156997 170559 [9,] 131500 139220 163398 159779 159316 170943 [10,] 132900 144033 164844 161106 159793 NA [11,] 133500 144683 165910 160659 161383 NA [12,] 133400 147354 165774 160007 161828 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -100 1660 3844 -20 135 1184 [2,] 800 -545 3255 640 455 -261 [3,] 900 2774 -641 -1167 -400 2898 [4,] -600 506 6111 -2105 818 1773 [5,] 0 646 724 519 1402 1432 [6,] 2500 638 2719 1167 -1370 -311 [7,] -200 -248 -2015 -3025 -2960 957 [8,] 400 -1039 588 -1111 2319 384 [9,] 1400 4813 1446 1327 477 NA [10,] 600 650 1066 -447 1590 NA [11,] -100 2671 -136 -652 445 NA [12,] 1428 1459 -893 -1090 1059 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/14oer1321376501.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/2kqim1321376501.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/3dogh1321376501.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/4i2ly1321376501.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,] 127800 127700.0 128500.0 129400 128800.0 128800.0 131300 131100.0 131500.0 [2,] 134828 136488.0 135943.0 138717 139223.0 139869.0 140507 140259.0 139220.0 [3,] 153865 155854.5 157709.5 157189 160653.5 161716.5 161936 158943.5 159547.5 [4,] 162887 164071.0 163810.0 164334 162229.0 162748.0 164825 162810.0 163398.0 [5,] 164881 164861.0 165501.0 166708 168481.0 169913.0 169602 170559.0 170943.0 [,10] [,11] [,12] [1,] 132900 133500 133400 [2,] 144033 144683 147354 [3,] 159793 160659 160007 [4,] 161106 161383 161828 [5,] 164844 165910 165774 $n [1] 6 6 6 6 6 6 6 6 6 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 135766.0 138062.6 139734.4 140665.2 145813.9 146958.8 146250.1 144397.4 [2,] 171964.0 173646.4 175684.6 173712.8 175493.1 176474.2 177621.9 173489.6 [,9] [,10] [,11] [,12] [1,] 143951.9 147729.3 148858.8 149779.7 [2,] 175143.1 171856.7 172459.2 170234.3 $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(127800, 134828, 153865, 162887, 164881, 127700, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5lmp81321376501.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] [1,] -100.0 -545.0 -1167 -2105 0 -1370.0 -3025.0 -1111 1327 600 -652 [2,] -20.0 -261.0 -641 -600 519 -311.0 -2960.0 -1039 1327 600 -136 [3,] 659.5 547.5 250 662 685 902.5 -1131.5 392 1400 650 -100 [4,] 1660.0 800.0 2774 1773 1402 2500.0 -200.0 588 1446 1066 445 [5,] 3844.0 800.0 2898 1773 1432 2719.0 957.0 2319 1446 1590 445 [,12] [1,] -1090 [2,] -893 [3,] 1059 [4,] 1428 [5,] 1459 $n [1] 6 6 6 6 6 6 6 6 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -424.1543 -136.8793 -1952.785 -868.6616 115.4365 -910.6858 -2911.7891 [2,] 1743.1543 1231.8793 2452.785 2192.6616 1254.5635 2715.6858 648.7891 [,8] [,9] [,10] [,11] [,12] [1,] -657.4676 1315.915 320.7256 -510.5331 -581.0128 [2,] 1441.4676 1484.085 979.2744 310.5331 2699.0128 $out [1] 3255 6111 4813 477 -447 2671 $group [1] 2 4 9 9 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-100, -20, 659.5, 1660, 3844, -545, -261, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6r8w41321376501.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,] 127700 134828.0 148813.0 159779.0 156997.0 162887 [2,] 128650 137602.5 155591.5 160774.5 159079.5 164071 [3,] 130250 139546.0 162458.0 162488.5 159650.0 168481 [4,] 132200 142270.0 164834.5 164597.5 160642.0 169913 [5,] 133500 147354.0 165910.0 165501.0 161828.0 170943 $n [1] 12 12 12 12 12 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 128630.8 137417.1 158242.2 160744.8 158937.3 165404.2 [2,] 131869.2 141674.9 166673.8 164232.2 160362.7 171557.8 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(127700, 128650, 130250, 132200, 133500, 134828, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/78vc01321376501.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,] 149687.7 153865.0 150109.4 [2,] 151892.5 157449.2 152202.1 [3,] 153283.5 159670.2 153120.4 [4,] 153897.6 160656.2 153648.6 [5,] 155017.7 161936.0 154983.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 152369.0 158207.5 152460.7 [2,] 154198.0 161133.0 153780.2 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(149687.666666667, 151892.5, 153283.5, 153897.583333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/14oer1321376501.ps tmp/14oer1321376501.png",intern=TRUE)) character(0) > try(system("convert tmp/2kqim1321376501.ps tmp/2kqim1321376501.png",intern=TRUE)) character(0) > try(system("convert tmp/3dogh1321376501.ps tmp/3dogh1321376501.png",intern=TRUE)) character(0) > try(system("convert tmp/4i2ly1321376501.ps tmp/4i2ly1321376501.png",intern=TRUE)) character(0) > try(system("convert tmp/5lmp81321376501.ps tmp/5lmp81321376501.png",intern=TRUE)) character(0) > try(system("convert tmp/6r8w41321376501.ps tmp/6r8w41321376501.png",intern=TRUE)) character(0) > try(system("convert tmp/78vc01321376501.ps tmp/78vc01321376501.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.044 0.428 2.451