R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-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(679,687,638,628,604,713,712,693,697,555,486,470,465,426,384,379,381,380,351,346,339,336,333,324,324,321,304,343,407,389,361,353,361,387,692,704,742,721,843,847,945,946,946,945,1082,1075,820,832,851,1090,1203,1239,1535,1527,1480,1452,1383,1381,1429,1376,1602,1597,2003,1958,1997,1986,2129,2115,2297,2250,2309,2648,2627,2711,2732,2825,2932,2910,2969,2999,2965,2846,2847,2751) > par1 = '4' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 84 > (np <- floor(n / par1)) [1] 21 > 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] 21 21 21 21 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 679 604 697 465 381 339 324 407 361 742 945 1082 851 1535 [2,] 687 713 555 426 380 336 321 389 387 721 946 1075 1090 1527 [3,] 638 712 486 384 351 333 304 361 692 843 946 820 1203 1480 [4,] 628 693 470 379 346 324 343 353 704 847 945 832 1239 1452 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [1,] 1383 1602 1997 2297 2627 2932 2965 NA [2,] 1381 1597 1986 2250 2711 2910 2846 NA [3,] 1429 2003 2129 2309 2732 2969 2847 NA [4,] 1376 1958 2115 2648 2825 2999 2751 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 8 109 -142 -39 -1 -3 -3 -18 26 -21 1 -7 239 -8 [2,] -49 -1 -69 -42 -29 -3 -17 -28 305 122 0 -255 113 -47 [3,] -10 -19 -16 -5 -5 -9 39 -8 12 4 -1 12 36 -28 [4,] -24 4 -5 2 -7 0 64 8 38 98 137 19 296 -69 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [1,] -2 -5 -11 -47 84 -22 -119 NA [2,] 48 406 143 59 21 59 1 NA [3,] -53 -45 -14 339 93 30 -96 NA [4,] 226 39 182 -21 107 -34 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/1vpit1382176827.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/2ee801382176827.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/3m0z01382176827.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/45ggh1382176827.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] [1,] 324 321 304 324 [2,] 465 426 486 470 [3,] 851 946 843 847 [4,] 1602 1597 2003 1958 [5,] 2965 2910 2969 2999 $n [1] 21 21 21 21 $conf [,1] [,2] [,3] [,4] [1,] 458.9803 542.2576 319.9623 333.961 [2,] 1243.0197 1349.7424 1366.0377 1360.039 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(324, 465, 851, 1602, 2965, 321, 426, 946, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/57cw01382176827.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] [1,] -47 -69 -53 -69.0 [2,] -21 -29 -16 -6.0 [3,] -5 0 -5 13.5 [4,] 1 59 12 102.5 [5,] 26 143 39 226.0 $n [1] 21 21 21 20 $conf [,1] [,2] [,3] [,4] [1,] -12.585254 -30.34102 -14.653959 -24.83291 [2,] 2.585254 30.34102 4.653959 51.83291 $out [1] 109 -142 239 84 -119 305 -255 406 339 93 -96 296 $group [1] 1 1 1 1 1 2 2 2 3 3 3 4 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(-47, -21, -5, 1, 26, -69, -29, 0, 59, 143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6k5gx1382176827.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] [,9] [,10] [,11] [,12] [1,] 628.0 604.0 470.0 379.0 346.0 324.0 304.0 353 361.0 721.0 945.0 820.0 [2,] 633.0 648.5 478.0 381.5 348.5 328.5 312.5 357 374.0 731.5 945.0 826.0 [3,] 658.5 702.5 520.5 405.0 365.5 334.5 322.5 375 539.5 792.5 945.5 953.5 [4,] 683.0 712.5 626.0 445.5 380.5 337.5 333.5 398 698.0 845.0 946.0 1078.5 [5,] 687.0 713.0 697.0 465.0 381.0 339.0 343.0 407 704.0 847.0 946.0 1082.0 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [1,] 851.0 1452.0 1376.0 1597.0 1986.0 2250.0 2627.0 2910.0 2751.0 NA [2,] 970.5 1466.0 1378.5 1599.5 1991.5 2273.5 2669.0 2921.0 2798.5 NA [3,] 1146.5 1503.5 1382.0 1780.0 2056.0 2303.0 2721.5 2950.5 2846.5 NA [4,] 1221.0 1531.0 1406.0 1980.5 2122.0 2478.5 2778.5 2984.0 2906.0 NA [5,] 1239.0 1535.0 1429.0 2003.0 2129.0 2648.0 2825.0 2999.0 2965.0 NA $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 619 651.94 403.58 354.44 340.22 327.39 305.91 342.61 283.54 702.835 [2,] 698 753.06 637.42 455.56 390.78 341.61 339.09 407.39 795.46 882.165 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 944.71 754.025 948.605 1452.15 1360.275 1479.01 1952.905 2141.05 [2,] 946.29 1152.975 1344.395 1554.85 1403.725 2080.99 2159.095 2464.95 [,19] [,20] [,21] [,22] [1,] 2634.995 2900.73 2761.575 NA [2,] 2808.005 3000.27 2931.425 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" NA Warning message: In bxp(list(stats = c(628, 633, 658.5, 683, 687, 604, 648.5, 702.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7pmed1382176827.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,] 1200.714 843.0 1011.50 [2,] 1201.167 845.0 1022.50 [3,] 1219.167 849.0 1123.75 [4,] 1242.810 898.5 1229.25 [5,] 1248.905 946.0 1244.50 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 1186.269 806.735 960.4175 [2,] 1252.065 891.265 1287.0825 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1200.71428571429, 1201.16666666667, 1219.16666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1vpit1382176827.ps tmp/1vpit1382176827.png",intern=TRUE)) character(0) > try(system("convert tmp/2ee801382176827.ps tmp/2ee801382176827.png",intern=TRUE)) character(0) > try(system("convert tmp/3m0z01382176827.ps tmp/3m0z01382176827.png",intern=TRUE)) character(0) > try(system("convert tmp/45ggh1382176827.ps tmp/45ggh1382176827.png",intern=TRUE)) character(0) > try(system("convert tmp/57cw01382176827.ps tmp/57cw01382176827.png",intern=TRUE)) character(0) > try(system("convert tmp/6k5gx1382176827.ps tmp/6k5gx1382176827.png",intern=TRUE)) character(0) > try(system("convert tmp/7pmed1382176827.ps tmp/7pmed1382176827.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.667 1.323 7.011