R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(53,86,66,67,76,78,53,80,74,76,79,54,67,54,87,58,75,88,64,57,66,68,54,56,86,80,76,69,78,67,80,54,71,84,74,71,63,71,76,69,74,75,54,52,69,68,65,75,74,75,72,67,63,62,63,76,74,67,73,70,53,77,77,52,54,80,66,73,63,69,67,54,81,69,84,80,70,69,77,54,79,30,71,73,72,77,75,69,54,70,73,54,77,82,80,80,69,78,81,76,76,73,85,66,79,68,76,71,54,46,82,74,88,38,76,86,54,70,69,90,54,76,89,76,73,79,90,74,81,72,71,66,77,65,74,82,54,63,54,64,69,54,84,86,77,89,76,60,75,73,85,79,71,72,69,78,54,69,81,84,84,69) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 162 > (np <- floor(n / par1)) [1] 13 > 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] 14 14 14 14 14 14 13 13 13 13 13 13 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 53 67 86 63 74 53 81 72 69 54 54 77 77 [2,] 86 54 80 71 75 77 69 77 78 46 76 65 89 [3,] 66 87 76 76 72 77 84 75 81 82 89 74 76 [4,] 67 58 69 69 67 52 80 69 76 74 76 82 60 [5,] 76 75 78 74 63 54 70 54 76 88 73 54 75 [6,] 78 88 67 75 62 80 69 70 73 38 79 63 73 [7,] 53 64 80 54 63 66 77 73 85 76 90 54 85 [8,] 80 57 54 52 76 73 54 54 66 86 74 64 79 [9,] 74 66 71 69 74 63 79 77 79 54 81 69 71 [10,] 76 68 84 68 67 69 30 82 68 70 72 54 72 [11,] 79 54 74 65 73 67 71 80 76 69 71 84 69 [12,] 54 56 71 75 70 54 73 80 71 90 66 86 78 [,14] [1,] 54 [2,] 69 [3,] 81 [4,] 84 [5,] 84 [6,] 69 [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 33 -13 -6 8 1 24 -12 5 9 -8 22 -12 12 [2,] -20 33 -4 5 -3 0 15 -2 3 36 13 9 -13 [3,] 1 -29 -7 -7 -5 -25 -4 -6 -5 -8 -13 8 -16 [4,] 9 17 9 5 -4 2 -10 -15 0 14 -3 -28 15 [5,] 2 13 -11 1 -1 26 -1 16 -3 -50 6 9 -2 [6,] -25 -24 13 -21 1 -14 8 3 12 38 11 -9 12 [7,] 27 -7 -26 -2 13 7 -23 -19 -19 10 -16 10 -6 [8,] -6 9 17 17 -2 -10 25 23 13 -32 7 5 -8 [9,] 2 2 13 -1 -7 6 -49 5 -11 16 -9 -15 1 [10,] 3 -14 -10 -3 6 -2 41 -2 8 -1 -1 30 -3 [11,] -25 2 -3 10 -3 -13 2 0 -5 21 -5 2 9 [12,] 13 30 -8 -1 -17 27 -1 -11 -17 -36 11 -9 -24 [,14] [1,] 15 [2,] 12 [3,] 3 [4,] 0 [5,] -15 [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/fisher/rcomp/tmp/11dld1355488690.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/fisher/rcomp/tmp/2dov51355488690.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/fisher/rcomp/tmp/3tpz41355488690.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/fisher/rcomp/tmp/4bgfr1355488690.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] [,12] [1,] 53 65.0 66.0 58 54.0 62.0 53 52 63 67 65 54 [2,] 54 69.0 75.0 67 63.0 67.0 63 54 69 68 69 66 [3,] 68 75.5 76.5 69 74.5 71.5 73 66 71 69 71 71 [4,] 77 78.0 82.0 76 76.0 78.0 80 76 77 72 76 78 [5,] 86 89.0 89.0 84 88.0 88.0 90 86 81 76 84 90 $n [1] 14 14 14 14 14 14 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 58.28773 71.69955 73.54409 65.19955 69.01045 66.855 65.55038 56.35931 [2,] 77.71227 79.30045 79.45591 72.80045 79.98955 76.145 80.44962 75.64069 [,9] [,10] [,11] [,12] [1,] 67.49429 67.24715 67.93251 65.74144 [2,] 74.50571 70.75285 74.06749 76.25856 $out [1] 54 46 52 38 54 84 30 82 54 54 $group [1] 2 2 4 6 9 10 10 10 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(53, 54, 68, 77, 86, 65, 69, 75.5, 78, 89, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/5vjum1355488690.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,] -13.0 -20 -25.0 -15 -15 -25 -26 -32 -15 -14 -13 -36 [2,] -8.0 -3 -13.0 -4 -3 -14 -19 -6 -9 -3 -5 -17 [3,] 6.5 4 -6.5 1 0 3 -6 7 1 -1 0 -8 [4,] 15.0 13 -4.0 9 9 12 10 17 5 6 2 11 [5,] 33.0 36 8.0 17 26 38 27 25 16 8 10 30 $n [1] 14 14 14 14 14 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -3.212274 -2.756364 -10.300455 -4.489546 -5.067273 -8.393542 -18.708181 [2,] 16.212274 10.756364 -2.699545 6.489546 5.067273 14.393542 6.708181 [,8] [,9] [,10] [,11] [,12] [1,] -3.078903 -5.134984 -4.943918 -3.067492 -20.269968 [2,] 17.078903 7.134984 2.943918 3.067492 4.269968 $out [1] -29 -28 -50 -49 41 30 -25 21 $group [1] 3 4 5 9 10 10 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-13, -8, 6.5, 15, 33, -20, -3, 4, 13, 36, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/6cev41355488690.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] [,13] [,14] [1,] 53.0 54.0 67 52.0 62 52.0 54.0 69.0 66.0 38 66.0 54.0 69.0 54 [2,] 60.0 56.5 70 64.0 65 54.0 69.0 69.5 70.0 54 71.5 58.5 71.5 69 [3,] 75.0 65.0 75 69.0 71 66.5 72.0 74.0 76.0 72 75.0 67.0 75.5 75 [4,] 78.5 71.5 80 74.5 74 75.0 79.5 78.5 78.5 84 80.0 79.5 78.5 84 [5,] 86.0 88.0 86 76.0 76 80.0 84.0 82.0 85.0 90 90.0 86.0 89.0 84 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 66.56203 58.1584 70.43893 64.21088 66.89504 56.92176 67.21088 69.89504 [2,] 83.43797 71.8416 79.56107 73.78912 75.10496 76.07824 76.78912 78.10496 [,9] [,10] [,11] [,12] [,13] [,14] [1,] 72.12309 58.3168 71.12309 57.42176 72.30725 65.32452 [2,] 79.87691 85.6832 78.87691 76.57824 78.69275 84.67548 $out [1] 54 30 54 54 54 60 $group [1] 3 7 8 8 11 13 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" NA Warning message: In bxp(list(stats = c(53, 60, 75, 78.5, 86, 54, 56.5, 65, 71.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/7leve1355488690.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,] 66.71429 66.00 70.0000 [2,] 68.95330 69.00 70.1875 [3,] 70.88462 71.00 71.7500 [4,] 71.50000 73.75 72.7500 [5,] 72.28571 76.50 73.3750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 69.72305 68.83349 70.58123 [2,] 72.04618 73.16651 72.91877 $out [1] 78.28571 65.12500 78.50000 65.00000 $group [1] 1 3 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(66.7142857142857, 68.9532967032967, 70.8846153846154, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/11dld1355488690.ps tmp/11dld1355488690.png",intern=TRUE)) character(0) > try(system("convert tmp/2dov51355488690.ps tmp/2dov51355488690.png",intern=TRUE)) character(0) > try(system("convert tmp/3tpz41355488690.ps tmp/3tpz41355488690.png",intern=TRUE)) character(0) > try(system("convert tmp/4bgfr1355488690.ps tmp/4bgfr1355488690.png",intern=TRUE)) character(0) > try(system("convert tmp/5vjum1355488690.ps tmp/5vjum1355488690.png",intern=TRUE)) character(0) > try(system("convert tmp/6cev41355488690.ps tmp/6cev41355488690.png",intern=TRUE)) character(0) > try(system("convert tmp/7leve1355488690.ps tmp/7leve1355488690.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.532 0.995 4.517