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(108,19,13,124,40,57,23,14,45,10,5,48,11,23,7,2,24,6,3,23,6,9,9,3,29,7,4,20,7,4,0,25,6,5,22,11,61,12,4,16,13,60,41,37,55,41,11,27,8,3,17,13,13,15,8,29,30,24,9,31,14,53,26) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 63 > (np <- floor(n / par1)) [1] 5 > 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 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 108 11 29 61 8 14 [2,] 19 23 7 12 3 53 [3,] 13 7 4 4 17 26 [4,] 124 2 20 16 13 NA [5,] 40 24 7 13 13 NA [6,] 57 6 4 60 15 NA [7,] 23 3 0 41 8 NA [8,] 14 23 25 37 29 NA [9,] 45 6 6 55 30 NA [10,] 10 9 5 41 24 NA [11,] 5 9 22 11 9 NA [12,] 48 3 11 27 31 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -89 12 -22 -49 -5 39 [2,] -6 -16 -3 -8 14 -27 [3,] 111 -5 16 12 -4 NA [4,] -84 22 -13 -3 0 NA [5,] 17 -18 -3 47 2 NA [6,] -34 -3 -4 -19 -7 NA [7,] -9 20 25 -4 21 NA [8,] 31 -17 -19 18 1 NA [9,] -35 3 -1 -14 -6 NA [10,] -5 0 17 -30 -15 NA [11,] 43 -6 -11 16 22 NA [12,] -37 26 50 -19 -17 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/1b2ul1321395820.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/2pair1321395820.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/3z7gs1321395820.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/4gkch1321395820.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 3.0 4 13 7 4 0 14 6 5 9 3 [2,] 11.0 7.0 4 13 13 6 3 23 6 9 9 11 [3,] 21.5 15.5 10 16 13 15 8 25 30 10 9 27 [4,] 61.0 23.0 17 20 24 57 23 29 45 24 11 31 [5,] 108.0 23.0 26 20 40 60 41 37 55 41 11 48 $n [1] 6 6 6 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -10.75161 5.179483 1.61458 11.05382 5.227428 -21.03647 -6.13195 [2,] 53.75161 25.820517 18.38542 20.94618 20.772572 51.03647 22.13195 [,8] [,9] [,10] [,11] [,12] [1,] 20.76042 2.442698 -0.5989622 7.586805 12.86805 [2,] 29.23958 57.557302 20.5989622 10.413195 41.13195 $out [1] 53 124 2 5 22 $group [1] 2 4 4 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(8, 11, 21.5, 61, 108, 3, 7, 15.5, 23, 23, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5qoxy1321395820.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,] -89.0 -27 -5 -13 -18 -34 -9 -19 -14 -30 -11 -37 [2,] -49.0 -16 -4 -13 -3 -19 -4 -17 -14 -15 -6 -19 [3,] -13.5 -7 12 -3 2 -7 20 1 -6 -5 16 -17 [4,] 12.0 -3 16 0 17 -4 21 18 -1 0 22 26 [5,] 39.0 14 16 0 47 -3 25 31 3 17 43 50 $n [1] 6 6 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -52.84697 -15.38542 -2.13195 -12.185767 -12.13195 -17.598962 2.335063 [2,] 25.84697 1.38542 26.13195 6.185767 16.13195 3.598962 37.664937 [,8] [,9] [,10] [,11] [,12] [1,] -23.73091 -15.185767 -15.598962 -3.784729 -48.79689 [2,] 25.73091 3.185767 5.598962 35.784729 14.79689 $out [1] 111 -84 22 -35 $group [1] 3 4 4 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-89, -49, -13.5, 12, 39, -27, -16, -7, -3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6owei1321395820.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] [1,] 5.0 2.0 0.0 4.0 3.0 14.0 [2,] 13.5 4.5 4.5 12.5 8.5 20.0 [3,] 31.5 8.0 7.0 32.0 14.0 26.0 [4,] 52.5 17.0 21.0 48.0 26.5 39.5 [5,] 108.0 24.0 29.0 61.0 31.0 53.0 $n [1] 12 12 12 12 12 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 13.71184 2.298666 -0.5257608 15.80821 5.790079 8.211838 [2,] 49.28816 13.701334 14.5257608 48.19179 22.209921 43.788162 $out [1] 124 $group [1] 1 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(5, 13.5, 31.5, 52.5, 108, 2, 4.5, 8, 17, 24, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7mk3e1321395820.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,] 11.20 8.00 10.0000 [2,] 16.40 10.00 14.0625 [3,] 21.75 15.25 17.5000 [4,] 28.40 23.25 25.7500 [5,] 38.50 30.00 32.3750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 16.27672 9.206586 12.16925 [2,] 27.22328 21.293414 22.83075 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(11.2, 16.4, 21.75, 28.4, 38.5, 8, 10, 15.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1b2ul1321395820.ps tmp/1b2ul1321395820.png",intern=TRUE)) character(0) > try(system("convert tmp/2pair1321395820.ps tmp/2pair1321395820.png",intern=TRUE)) character(0) > try(system("convert tmp/3z7gs1321395820.ps tmp/3z7gs1321395820.png",intern=TRUE)) character(0) > try(system("convert tmp/4gkch1321395820.ps tmp/4gkch1321395820.png",intern=TRUE)) character(0) > try(system("convert tmp/5qoxy1321395820.ps tmp/5qoxy1321395820.png",intern=TRUE)) character(0) > try(system("convert tmp/6owei1321395820.ps tmp/6owei1321395820.png",intern=TRUE)) character(0) > try(system("convert tmp/7mk3e1321395820.ps tmp/7mk3e1321395820.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.525 0.308 1.840