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(14,18,11,12,16,18,14,14,15,15,17,19,10,16,18,14,14,17,14,16,18,11,14,12,17,9,16,14,15,11,16,13,17,15,14,16,9,15,17,13,15,16,16,12,12,11,15,15,17,13,16,14,11,12,12,15,16,15,12,12,8,13,11,14,15,10,11,12,15,15,14,16,15,15,13,12,17,13,15,13,15,16,15,16,15,14,15,14,13,7,17,13,15,14,13,16,12,14,17,15,17,12,16,11,15,9,16,15,10,10,15,11,13,14,18,16,14,14,14,14,12,14,15,15,15,13,17,17,19,15,13,9,15,15,15,16,11,14,11,15,13,15,16,14,15,16,16,11,12,9,16,13,16,12,9,13,13,14,19,13,12,13) > 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,] 14 10 17 9 17 8 15 15 12 10 12 15 15 [2,] 18 16 9 15 13 13 15 14 14 10 14 15 16 [3,] 11 18 16 17 16 11 13 15 17 15 15 15 16 [4,] 12 14 14 13 14 14 12 14 15 11 15 16 11 [5,] 16 14 15 15 11 15 17 13 17 13 15 11 12 [6,] 18 17 11 16 12 10 13 7 12 14 13 14 9 [7,] 14 14 16 16 12 11 15 17 16 18 17 11 16 [8,] 14 16 13 12 15 12 13 13 11 16 17 15 13 [9,] 15 18 17 12 16 15 15 15 15 14 19 13 16 [10,] 15 11 15 11 15 15 16 14 9 14 15 15 12 [11,] 17 14 14 15 12 14 15 13 16 14 13 16 9 [12,] 19 12 16 15 12 16 16 16 15 14 9 14 13 [,14] [1,] 13 [2,] 14 [3,] 19 [4,] 13 [5,] 12 [6,] 13 [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,] 4 6 -8 6 -4 5 0 -1 2 0 2 0 1 [2,] -7 2 7 2 3 -2 -2 1 3 5 1 0 0 [3,] 1 -4 -2 -4 -2 3 -1 -1 -2 -4 0 1 -5 [4,] 4 0 1 2 -3 1 5 -1 2 2 0 -5 1 [5,] 2 3 -4 1 1 -5 -4 -6 -5 1 -2 3 -3 [6,] -4 -3 5 0 0 1 2 10 4 4 4 -3 7 [7,] 0 2 -3 -4 3 1 -2 -4 -5 -2 0 4 -3 [8,] 1 2 4 0 1 3 2 2 4 -2 2 -2 3 [9,] 0 -7 -2 -1 -1 0 1 -1 -6 0 -4 2 -4 [10,] 2 3 -1 4 -3 -1 -1 -1 7 0 -2 1 -3 [11,] 2 -2 2 0 0 2 1 3 -1 0 -4 -2 4 [12,] -9 5 -7 2 -4 -1 -1 -4 -5 -2 6 1 0 [,14] [1,] 1 [2,] 5 [3,] -6 [4,] -1 [5,] 1 [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/wessaorg/rcomp/tmp/1z8k01321112428.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/223dm1321112428.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/3qf9n1321112428.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/4w2tg1321112428.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,] 8.0 10 13.0 11 11.0 7 11 11 14 9 12 9 [2,] 10.0 13 15.0 12 12.0 11 14 13 15 12 13 13 [3,] 13.5 14 15.5 14 14.5 13 16 13 15 15 14 15 [4,] 15.0 15 17.0 14 15.0 14 16 15 16 15 15 16 [5,] 17.0 18 19.0 16 17.0 18 18 17 17 16 17 19 $n [1] 14 14 14 14 14 14 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 11.38864 13.15545 14.65545 13.15545 13.23318 11.73318 15.12357 12.12357 [2,] 15.61136 14.84455 16.34455 14.84455 15.76682 14.26682 16.87643 13.87643 [,9] [,10] [,11] [,12] [1,] 14.56179 13.68536 13.12357 13.68536 [2,] 15.43821 16.31464 14.87643 16.31464 $out [1] 9 11 11 18 12 19 13 9 $group [1] 2 3 3 9 9 9 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(8, 10, 13.5, 15, 17, 10, 13, 14, 15, 18, 13, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5nwee1321112428.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,] -4 -2.0 -6 -5 -6.0 -4 -5 -2 -7 -3 -4 -9 [2,] 0 0.0 -4 -1 -4.0 0 -3 1 -4 -1 -1 -4 [3,] 1 1.5 -2 1 -0.5 2 -2 2 -1 -1 0 -1 [4,] 4 3.0 0 2 1.0 4 1 3 0 2 2 1 [5,] 6 7.0 3 5 3.0 10 4 4 2 4 4 6 $n [1] 14 14 14 14 14 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.689091 0.2331817 -3.689091 -0.2668183 -2.611364 0.2471474 -3.7528526 [2,] 2.689091 2.7668183 -0.310909 2.2668183 1.611364 3.7528526 -0.2471474 [,8] [,9] [,10] [,11] [,12] [1,] 1.123574 -2.7528526 -2.3146395 -1.314639 -3.191066 [2,] 2.876426 0.7528526 0.3146395 1.314639 1.191066 $out [1] -8 -7 7 $group [1] 1 2 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4, 0, 1, 4, 6, -2, 0, 1.5, 3, 7, -6, -4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6hcxg1321112428.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,] 11.0 10.0 11.0 9.0 11.0 8.0 12.0 13 9 10.0 9 13.0 9.0 12 [2,] 14.0 13.0 13.5 12.0 12.0 11.0 13.0 13 12 12.0 13 13.5 11.5 13 [3,] 15.0 14.0 15.0 15.0 13.5 13.5 15.0 14 15 14.0 15 15.0 13.0 13 [4,] 17.5 16.5 16.0 15.5 15.5 15.0 15.5 15 16 14.5 16 15.0 16.0 14 [5,] 19.0 18.0 17.0 17.0 17.0 16.0 17.0 17 17 18.0 19 16.0 16.0 14 $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,] 13.40363 12.40363 13.85973 13.40363 11.90363 11.67557 13.85973 13.08779 [2,] 16.59637 15.59637 16.14027 16.59637 15.09637 15.32443 16.14027 14.91221 [,9] [,10] [,11] [,12] [,13] [,14] [1,] 13.17557 12.85973 13.63168 14.31584 10.94752 12.35497 [2,] 16.82443 15.14027 16.36832 15.68416 15.05248 13.64503 $out [1] 9 7 11 11 19 $group [1] 3 8 12 12 14 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" NA Warning message: In bxp(list(stats = c(11, 14, 15, 17.5, 19, 10, 13, 14, 16.5, 18, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7yj9n1321112428.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,] 12.78571 13.00 12.6250 [2,] 13.52198 13.75 13.3125 [3,] 14.00000 14.25 14.0000 [4,] 14.61538 15.00 14.7500 [5,] 15.38462 16.00 15.8750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 13.50129 13.67987 13.34435 [2,] 14.49871 14.82013 14.65565 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(12.7857142857143, 13.521978021978, 14, 14.6153846153846, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1z8k01321112428.ps tmp/1z8k01321112428.png",intern=TRUE)) character(0) > try(system("convert tmp/223dm1321112428.ps tmp/223dm1321112428.png",intern=TRUE)) character(0) > try(system("convert tmp/3qf9n1321112428.ps tmp/3qf9n1321112428.png",intern=TRUE)) character(0) > try(system("convert tmp/4w2tg1321112428.ps tmp/4w2tg1321112428.png",intern=TRUE)) character(0) > try(system("convert tmp/5nwee1321112428.ps tmp/5nwee1321112428.png",intern=TRUE)) character(0) > try(system("convert tmp/6hcxg1321112428.ps tmp/6hcxg1321112428.png",intern=TRUE)) character(0) > try(system("convert tmp/7yj9n1321112428.ps tmp/7yj9n1321112428.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.651 0.350 2.322