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(55.7,59.2,59.8,61.6,65.8,64.2,67,62.8,65.5,75.2,80.9,83.2,83.7,86.4,85.9,80.4,81.8,87.5,83.7,87,99.7,101.4,101.9,115.7,123.2,136.9,146.8,149.6,146.5,157,147.9,133.6,128.7,100.8,91.8,89.3,96.7,91.6,93.3,93.3,101,100.4,86.9,83.9,80.3,87.7,92.7,95.5,92,87.4,86.8,83.7,85,81.7,90.9,101.5,113.8,120.1,122.1,132.5,140,149.4,144.3,154.4,151.4,145.5,136.8,146.6,145.1,133.6,131.4,127.5,130.1,131.1,132.3,128.6,125.1,128.7,156.1,163.2,159.8,157.4,156.2,152.5) > 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,] 55.7 83.7 123.2 96.7 92.0 140.0 130.1 NA [2,] 59.2 86.4 136.9 91.6 87.4 149.4 131.1 NA [3,] 59.8 85.9 146.8 93.3 86.8 144.3 132.3 NA [4,] 61.6 80.4 149.6 93.3 83.7 154.4 128.6 NA [5,] 65.8 81.8 146.5 101.0 85.0 151.4 125.1 NA [6,] 64.2 87.5 157.0 100.4 81.7 145.5 128.7 NA [7,] 67.0 83.7 147.9 86.9 90.9 136.8 156.1 NA [8,] 62.8 87.0 133.6 83.9 101.5 146.6 163.2 NA [9,] 65.5 99.7 128.7 80.3 113.8 145.1 159.8 NA [10,] 75.2 101.4 100.8 87.7 120.1 133.6 157.4 NA [11,] 80.9 101.9 91.8 92.7 122.1 131.4 156.2 NA [12,] 83.2 115.7 89.3 95.5 132.5 127.5 152.5 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3.5 2.7 13.7 -5.1 -4.6 9.4 1.0 NA [2,] 0.6 -0.5 9.9 1.7 -0.6 -5.1 1.2 NA [3,] 1.8 -5.5 2.8 0.0 -3.1 10.1 -3.7 NA [4,] 4.2 1.4 -3.1 7.7 1.3 -3.0 -3.5 NA [5,] -1.6 5.7 10.5 -0.6 -3.3 -5.9 3.6 NA [6,] 2.8 -3.8 -9.1 -13.5 9.2 -8.7 27.4 NA [7,] -4.2 3.3 -14.3 -3.0 10.6 9.8 7.1 NA [8,] 2.7 12.7 -4.9 -3.6 12.3 -1.5 -3.4 NA [9,] 9.7 1.7 -27.9 7.4 6.3 -11.5 -2.4 NA [10,] 5.7 0.5 -9.0 5.0 2.0 -2.2 -1.2 NA [11,] 2.3 13.8 -2.5 2.8 10.4 -3.9 -3.7 NA [12,] 0.5 7.5 7.4 -3.5 7.5 2.6 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/1npxy1387019037.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/2nbf91387019037.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/3xv221387019037.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/4w5s21387019037.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] [1,] 55.70 59.2 59.80 61.60 65.8 64.2 67.00 62.80 65.5 75.20 80.90 [2,] 87.85 86.9 86.35 82.05 83.4 84.6 85.30 85.45 90.0 94.25 92.25 [3,] 96.70 91.6 93.30 93.30 101.0 100.4 90.90 101.50 113.8 101.40 101.90 [4,] 126.65 134.0 138.30 139.10 135.8 137.1 142.35 140.10 136.9 126.85 126.75 [5,] 140.00 149.4 146.80 154.40 151.4 157.0 156.10 163.20 159.8 157.40 156.20 [,12] [1,] 83.2 [2,] 92.4 [3,] 115.7 [4,] 130.0 [5,] 152.5 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 73.52927 63.47264 62.2763 59.23066 69.70757 69.04785 56.83066 [2,] 119.87073 119.72736 124.3237 127.36934 132.29243 131.75215 124.96934 [,8] [,9] [,10] [,11] [,12] [1,] 68.8639 85.79208 81.93181 81.29716 93.24589 [2,] 134.1361 141.80792 120.86819 122.50284 138.15411 $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(55.7, 87.85, 96.7, 126.65, 140, 59.2, 86.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5oxma1387019037.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,] -5.10 -0.60 -5.5 -3.50 -5.90 -13.5 -14.30 -4.9 -11.50 -9.0 -3.9 -3.5 [2,] -1.80 -0.55 -3.4 -3.05 -2.45 -8.9 -3.60 -3.5 -6.95 -1.7 -3.1 0.5 [3,] 2.70 0.60 0.0 1.30 -0.60 -3.8 3.30 -1.5 1.70 0.5 2.3 5.0 [4,] 6.45 1.45 2.3 2.80 4.65 6.0 8.45 7.5 6.85 3.5 6.6 7.5 [5,] 13.70 1.70 10.1 7.70 10.50 27.4 10.60 12.7 9.70 5.7 13.8 7.5 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -2.226767 -0.5943677 -3.403948 -2.193526 -4.840005 -12.69804 -3.896066 [2,] 7.626767 1.7943677 3.403948 4.793526 3.640005 5.09804 10.496066 [,8] [,9] [,10] [,11] [,12] [1,] -8.069023 -6.541137 -2.605356 -3.492684 0.4847739 [2,] 5.069023 9.941137 3.605356 8.092684 9.5152261 $out [1] 9.9 -5.1 -27.9 $group [1] 2 2 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-5.10000000000001, -1.8, 2.7, 6.45, 13.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/635ud1387019037.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,] 55.70 80.40 89.30 80.3 81.70 127.5 125.1 NA [2,] 60.70 83.70 112.00 87.3 85.90 135.2 129.4 NA [3,] 64.85 86.70 135.25 93.0 91.45 144.7 142.4 NA [4,] 71.10 100.55 147.35 96.1 116.95 148.0 156.8 NA [5,] 83.20 115.70 157.00 101.0 132.50 154.4 163.2 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 60.10649 79.0146 119.1266 88.98626 77.28789 138.8618 129.9027 NA [2,] 69.59351 94.3854 151.3734 97.01374 105.61211 150.5382 154.8973 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(55.7, 60.7, 64.85, 71.1, 83.2, 80.4, 83.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7kcry1387019037.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,] 103.0571 90.9 107.2500 [2,] 107.2000 93.3 110.0250 [3,] 109.5929 100.7 110.7125 [4,] 111.1143 101.7 112.5500 [5,] 113.7429 113.8 113.8250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 107.8075 96.8687 109.5608 [2,] 111.3782 104.5313 111.8642 $out [1] 115.7 $group [1] 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(103.057142857143, 107.2, 109.592857142857, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1npxy1387019037.ps tmp/1npxy1387019037.png",intern=TRUE)) character(0) > try(system("convert tmp/2nbf91387019037.ps tmp/2nbf91387019037.png",intern=TRUE)) character(0) > try(system("convert tmp/3xv221387019037.ps tmp/3xv221387019037.png",intern=TRUE)) character(0) > try(system("convert tmp/4w5s21387019037.ps tmp/4w5s21387019037.png",intern=TRUE)) character(0) > try(system("convert tmp/5oxma1387019037.ps tmp/5oxma1387019037.png",intern=TRUE)) character(0) > try(system("convert tmp/635ud1387019037.ps tmp/635ud1387019037.png",intern=TRUE)) character(0) > try(system("convert tmp/7kcry1387019037.ps tmp/7kcry1387019037.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.983 0.991 5.954