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(122.0,104.1,102.9,105.1,151.5,155.0,99.2,91.7,144.3,118.9,196.5,96.4,121.8,101.4,102.5,98.1,162.9,102.1,108.7,74.4,72.7,100.6,108.7,126.8,130.9,125.2,93.9,116.5,140.4,77.8,82.7,92.6,91.5,101.7,96.7,118.7,123.1,121.0,129.6,133.9,147.7,28.2,16.9,26.1,27.7,42.6,104.5,151.7,72.6,67.3,113.4,99.9,112.8,121.2,97.9,109.9,135.7,137.1,126.6,121.4) > par1 = '3' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 20 > 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] 20 20 20 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 122.0 105.1 99.2 118.9 121.8 98.1 108.7 100.6 130.9 116.5 82.7 101.7 [2,] 104.1 151.5 91.7 196.5 101.4 162.9 74.4 108.7 125.2 140.4 92.6 96.7 [3,] 102.9 155.0 144.3 96.4 102.5 102.1 72.7 126.8 93.9 77.8 91.5 118.7 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 123.1 133.9 16.9 42.6 72.6 99.9 97.9 137.1 NA [2,] 121.0 147.7 26.1 104.5 67.3 112.8 109.9 126.6 NA [3,] 129.6 28.2 27.7 151.7 113.4 121.2 135.7 121.4 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] -17.9 46.4 -7.5 77.6 -20.4 64.8 -34.3 8.1 -5.7 23.9 9.9 -5.0 [2,] -1.2 3.5 52.6 -100.1 1.1 -60.8 -1.7 18.1 -31.3 -62.6 -1.1 22.0 [3,] 2.2 -55.8 -25.4 25.4 -4.4 6.6 27.9 4.1 22.6 4.9 10.2 4.4 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -2.1 13.8 9.2 61.9 -5.3 12.9 12.0 -10.5 NA [2,] 8.6 -119.5 1.6 47.2 46.1 8.4 25.8 -5.2 NA [3,] 4.3 -11.3 14.9 -79.1 -13.5 -23.3 1.4 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/1si0s1321388933.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/2x63v1321388933.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/3bavg1321388933.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/4saui1321388933.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] [1,] 72.6 67.30 72.70 [2,] 98.0 94.65 92.70 [3,] 103.4 109.30 108.15 [4,] 121.9 133.50 128.20 [5,] 137.1 162.90 155.00 $n [1] 20 20 20 $conf [,1] [,2] [,3] [1,] 94.95616 95.57434 95.60789 [2,] 111.84384 123.02566 120.69211 $out [1] 16.9 42.6 196.5 26.1 28.2 27.7 $group [1] 1 1 2 2 3 3 $names [1] "1" "2" "3" Warning message: In bxp(list(stats = c(72.6, 98, 103.4, 121.9, 137.1, 67.3, 94.65, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5a4ta1321388933.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] [1,] -34.30 -62.60 -25.4 [2,] -6.60 -18.25 -12.4 [3,] 8.65 1.35 4.1 [4,] 18.85 20.05 8.4 [5,] 46.40 52.60 27.9 $n [1] 20 20 19 $conf [,1] [,2] [,3] [1,] -0.3414529 -12.18134 -3.439519 [2,] 17.6414529 14.88134 11.639519 $out [1] 77.6 64.8 61.9 -100.1 -119.5 -55.8 -79.1 $group [1] 1 1 1 2 2 3 3 $names [1] "1" "2" "3" Warning message: In bxp(list(stats = c(-34.3, -6.6, 8.65000000000001, 18.85, 46.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6ykec1321388933.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] [1,] 102.90 105.10 91.70 96.40 101.40 98.1 72.70 100.60 93.90 77.80 82.70 [2,] 103.50 128.30 95.45 107.65 101.95 100.1 73.55 104.65 109.55 97.15 87.10 [3,] 104.10 151.50 99.20 118.90 102.50 102.1 74.40 108.70 125.20 116.50 91.50 [4,] 113.05 153.25 121.75 157.70 112.15 132.5 91.55 117.75 128.05 128.45 92.05 [5,] 122.00 155.00 144.30 196.50 121.80 162.9 108.70 126.80 130.90 140.40 92.60 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 96.7 121.00 28.20 16.9 42.60 67.30 99.90 97.9 121.40 NA [2,] 99.2 122.05 81.05 21.5 73.55 69.95 106.35 103.9 124.00 NA [3,] 101.7 123.10 133.90 26.1 104.50 72.60 112.80 109.9 126.60 NA [4,] 110.2 126.35 140.80 26.9 128.10 93.00 117.00 122.8 131.85 NA [5,] 118.7 129.60 147.70 27.7 151.70 113.40 121.20 135.7 137.10 NA $n [1] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 95.38836 128.7403 75.20879 73.24372 93.19542 72.54429 57.98016 96.75 [2,] 112.81164 174.2597 123.19121 164.55628 111.80458 131.65571 90.81984 120.65 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [1,] 108.3241 87.94772 86.98454 91.66565 119.1775 79.39525 21.17405 [2,] 142.0759 145.05228 96.01546 111.73435 127.0225 188.40475 31.02595 [,16] [,17] [,18] [,19] [,20] [,21] [1,] 54.73876 51.57348 103.0849 92.65917 119.4391 NA [2,] 154.26124 93.62652 122.5151 127.14083 133.7609 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" NA Warning message: In bxp(list(stats = c(102.9, 103.5, 104.1, 113.05, 122, 105.1, 128.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7tkce1321388933.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,] 101.5100 103.400 109.9500 [2,] 103.5925 105.775 110.1750 [3,] 105.6750 108.150 110.4000 [4,] 109.3875 108.725 111.6312 [5,] 113.1000 109.300 112.8625 $n [1] 3 3 3 $conf [,1] [,2] [,3] [1,] 100.3887 105.459 109.0716 [2,] 110.9613 110.841 111.7284 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(101.51, 103.5925, 105.675, 109.3875, 113.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1si0s1321388933.ps tmp/1si0s1321388933.png",intern=TRUE)) character(0) > try(system("convert tmp/2x63v1321388933.ps tmp/2x63v1321388933.png",intern=TRUE)) character(0) > try(system("convert tmp/3bavg1321388933.ps tmp/3bavg1321388933.png",intern=TRUE)) character(0) > try(system("convert tmp/4saui1321388933.ps tmp/4saui1321388933.png",intern=TRUE)) character(0) > try(system("convert tmp/5a4ta1321388933.ps tmp/5a4ta1321388933.png",intern=TRUE)) character(0) > try(system("convert tmp/6ykec1321388933.ps tmp/6ykec1321388933.png",intern=TRUE)) character(0) > try(system("convert tmp/7tkce1321388933.ps tmp/7tkce1321388933.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.562 0.358 1.918