R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(76035,74427,73354,73081,75309,75463,75910,76151,76882,78632,80137,82490,79896,81303,79344,81355,82328,79669,77249,75101,72520,72438,72653,71429,69189,66451,63354,61379,61880,62274,62429,63905,63917,64295,61930,60440,59353,58695,60569,60386,60938,61795,63304,64270,63492,61333,59341,58412,58725,59277,58562,57858,58790,58243,57044,57339,59429,60575,61950,61712) > par1 = '10' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 6 > 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 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 76035 80137 72520 62429 60938 58562 NA [2,] 74427 82490 72438 63905 61795 57858 NA [3,] 73354 79896 72653 63917 63304 58790 NA [4,] 73081 81303 71429 64295 64270 58243 NA [5,] 75309 79344 69189 61930 63492 57044 NA [6,] 75463 81355 66451 60440 61333 57339 NA [7,] 75910 82328 63354 59353 59341 59429 NA [8,] 76151 79669 61379 58695 58412 60575 NA [9,] 76882 77249 61880 60569 58725 61950 NA [10,] 78632 75101 62274 60386 59277 61712 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1608 2353 -82 1476 857 -704 NA [2,] -1073 -2594 215 12 1509 932 NA [3,] -273 1407 -1224 378 966 -547 NA [4,] 2228 -1959 -2240 -2365 -778 -1199 NA [5,] 154 2011 -2738 -1490 -2159 295 NA [6,] 447 973 -3097 -1087 -1992 2090 NA [7,] 241 -2659 -1975 -658 -929 1146 NA [8,] 731 -2420 501 1874 313 1375 NA [9,] 1750 -2148 394 -183 552 -238 NA [10,] 1505 -2581 155 552 -715 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/18xcm1321387406.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/2h09g1321387406.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/3ticf1321387406.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/4po411321387406.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] [1,] 58562.0 57858.0 58790 58243 57044.0 57339 59341.0 58412 58725 59277 [2,] 60938.0 61795.0 63304 64270 61930.0 60440 59353.0 58695 60569 60386 [3,] 67474.5 68171.5 68285 67862 66340.5 63892 61391.5 60977 61915 61993 [4,] 76035.0 74427.0 73354 73081 75309.0 75463 75910.0 76151 76882 75101 [5,] 80137.0 82490.0 79896 81303 79344.0 81355 82328.0 79669 77249 78632 $n [1] 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 57736.45 60023.45 61802.43 62178.62 57710.61 54201.68 50711.7 49717.32 [2,] 77212.55 76319.55 74767.57 73545.38 74970.39 73582.32 72071.3 72236.68 [,9] [,10] [1,] 51392.59 52501.35 [2,] 72437.41 71484.65 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" Warning message: In bxp(list(stats = c(58562, 60938, 67474.5, 76035, 80137, 57858, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/510vo1321387406.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,] -1608.0 -2594.0 -1224.0 -2365 -2738 -3097 -2659.0 313 -238.0 -2581 [2,] -704.0 -1073.0 -547.0 -2240 -2159 -1992 -1975.0 313 -238.0 -715 [3,] 387.5 113.5 52.5 -1579 -668 -320 -793.5 616 105.5 155 [4,] 1476.0 932.0 966.0 -778 295 973 241.0 1375 552.0 552 [5,] 2353.0 1509.0 1407.0 -778 2011 2090 1146.0 1874 552.0 1505 $n [1] 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1018.67 -1179.79 -923.4339 -2522.0372 -2250.9093 -2232.521 -2222.8916 [2,] 1793.67 1406.79 1028.4339 -635.9628 914.9093 1592.521 635.8916 [,8] [,9] [,10] [1,] -69.0243 -404.0755 -740.259 [2,] 1301.0243 615.0755 1050.259 $out [1] 2228 -2420 1750 -2148 $group [1] 4 8 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" Warning message: In bxp(list(stats = c(-1608, -704, 387.5, 1476, 2353, -2594, -1073, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6x8xg1321387406.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] [1,] 73081.0 77249.0 61379 58695.0 58412.0 57044 NA [2,] 74427.0 79344.0 62274 60386.0 59277.0 57858 NA [3,] 75686.5 80016.5 67820 61249.5 61135.5 58676 NA [4,] 76151.0 81355.0 72438 63905.0 63304.0 60575 NA [5,] 78632.0 82490.0 72653 64295.0 64270.0 61950 NA $n [1] 10 10 10 10 10 10 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 74825.12 79011.72 62741.66 59491.27 59123.45 57318.48 NA [2,] 76547.88 81021.28 72898.34 63007.73 63147.55 60033.52 NA $out [1] 75101 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(73081, 74427, 75686.5, 76151, 78632, 77249, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7x1f91321387406.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,] 65813.50 60977.00 65811.50 [2,] 66230.33 61915.00 66305.88 [3,] 67390.75 65116.25 67536.31 [4,] 68652.33 67862.00 68233.50 [5,] 68818.83 68285.00 68472.12 $n [1] 10 10 10 $conf [,1] [,2] [,3] [1,] 66180.62 62144.89 66573.19 [2,] 68600.88 68087.61 68499.43 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(65813.5, 66230.3333333333, 67390.75, 68652.3333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/18xcm1321387406.ps tmp/18xcm1321387406.png",intern=TRUE)) character(0) > try(system("convert tmp/2h09g1321387406.ps tmp/2h09g1321387406.png",intern=TRUE)) character(0) > try(system("convert tmp/3ticf1321387406.ps tmp/3ticf1321387406.png",intern=TRUE)) character(0) > try(system("convert tmp/4po411321387406.ps tmp/4po411321387406.png",intern=TRUE)) character(0) > try(system("convert tmp/510vo1321387406.ps tmp/510vo1321387406.png",intern=TRUE)) character(0) > try(system("convert tmp/6x8xg1321387406.ps tmp/6x8xg1321387406.png",intern=TRUE)) character(0) > try(system("convert tmp/7x1f91321387406.ps tmp/7x1f91321387406.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.622 0.332 1.968