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(164,148,152,144,155,125,153,146,138,190,192,192,147,133,163,150,129,131,145,137,138,168,176,188,139,143,150,154,137,129,128,140,143,151,177,184,151,134,164,126,131,125,127,143,143,160,190,182,138,136,152,127,151,130,119,153) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 56 > (np <- floor(n / par1)) [1] 4 > 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] 5 5 5 5 5 5 5 5 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 164 147 139 151 138 [2,] 148 133 143 134 136 [3,] 152 163 150 164 152 [4,] 144 150 154 126 127 [5,] 155 129 137 131 151 [6,] 125 131 129 125 130 [7,] 153 145 128 127 119 [8,] 146 137 140 143 153 [9,] 138 138 143 143 NA [10,] 190 168 151 160 NA [11,] 192 176 177 190 NA [12,] 192 188 184 182 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] -16 -14 4 -17 -2 [2,] 4 30 7 30 16 [3,] -8 -13 4 -38 -25 [4,] 11 -21 -17 5 24 [5,] -30 2 -8 -6 -21 [6,] 28 14 -1 2 -11 [7,] -7 -8 12 16 34 [8,] -8 1 3 0 NA [9,] 52 30 8 17 NA [10,] 2 8 26 30 NA [11,] 0 12 7 -8 NA [12,] -45 -49 -33 -44 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/14ojr1324404653.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/2cngz1324404653.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/3ea5c1324404653.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/4dzf71324404653.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,] 138 133 150 126 129 125 119 137 138.0 151.0 176.0 182 [2,] 139 134 152 127 131 125 127 140 138.0 155.5 176.5 183 [3,] 147 136 152 144 137 129 128 143 140.5 164.0 183.5 186 [4,] 151 143 163 150 151 130 145 146 143.0 179.0 191.0 190 [5,] 164 148 164 154 155 131 153 153 143.0 190.0 192.0 192 $n [1] 5 5 5 5 5 5 5 5 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 138.5208 129.6406 144.2274 127.7483 122.8681 125.467 115.2812 138.7604 [2,] 155.4792 142.3594 159.7726 160.2517 151.1319 132.533 140.7188 147.2396 [,9] [,10] [,11] [,12] [1,] 136.55 145.435 172.045 180.47 [2,] 144.45 182.565 194.955 191.53 $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(138, 139, 147, 151, 164, 133, 134, 136, 143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/546701324404653.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,] -17 4 -38 -21 -30 -11 -8 -8.0 8.0 2 -8.0 -49.0 [2,] -16 7 -25 -17 -21 -1 -7 -4.0 12.5 5 -4.0 -47.0 [3,] -14 16 -13 5 -8 2 12 0.5 23.5 17 3.5 -44.5 [4,] -2 30 -8 11 -6 14 16 2.0 41.0 28 9.5 -38.5 [5,] 4 30 4 24 2 28 34 3.0 52.0 30 12.0 -33.0 $n [1] 5 5 5 5 5 5 5 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -23.892365 -0.2517421 -25.0121572 -14.78473 -18.598962 -8.598962 -4.251742 [2,] -4.107635 32.2517421 -0.9878428 24.78473 2.598962 12.598962 28.251742 [,8] [,9] [,10] [,11] [,12] [1,] -4.24 0.985 -1.17 -7.165 -51.215 [2,] 5.24 46.015 35.17 14.165 -37.785 $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(-17, -16, -14, -2, 4, 4, 7, 16, 30, 30, -38, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/66zap1324404653.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] [1,] 125.0 129.0 128.0 125 119.0 [2,] 145.0 135.0 138.0 129 128.5 [3,] 152.5 146.0 143.0 143 137.0 [4,] 177.0 165.5 152.5 162 151.5 [5,] 192.0 188.0 154.0 190 153.0 $n [1] 12 12 12 12 8 $conf [,1] [,2] [,3] [,4] [,5] [1,] 137.9046 132.0887 136.3865 127.9485 124.1519 [2,] 167.0954 159.9113 149.6135 158.0515 149.8481 $out [1] 177 184 $group [1] 3 3 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(125, 145, 152.5, 177, 192, 129, 135, 146, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/738gf1324404653.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,] 128.000 128.0 127.5000 [2,] 139.500 136.5 138.5000 [3,] 142.200 143.5 142.0000 [4,] 161.725 158.0 161.5625 [5,] 186.500 186.0 186.2500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 132.063 133.6937 131.481 [2,] 152.337 153.3063 152.519 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(128, 139.5, 142.2, 161.725, 186.5, 128, 136.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/14ojr1324404653.ps tmp/14ojr1324404653.png",intern=TRUE)) character(0) > try(system("convert tmp/2cngz1324404653.ps tmp/2cngz1324404653.png",intern=TRUE)) character(0) > try(system("convert tmp/3ea5c1324404653.ps tmp/3ea5c1324404653.png",intern=TRUE)) character(0) > try(system("convert tmp/4dzf71324404653.ps tmp/4dzf71324404653.png",intern=TRUE)) character(0) > try(system("convert tmp/546701324404653.ps tmp/546701324404653.png",intern=TRUE)) character(0) > try(system("convert tmp/66zap1324404653.ps tmp/66zap1324404653.png",intern=TRUE)) character(0) > try(system("convert tmp/738gf1324404653.ps tmp/738gf1324404653.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.656 0.422 2.083