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,126.0,127.4,123.5,137.4,153.2,107.4,84.6,98.0,100.2,104.4,93.9,122.0,126.0,127.4,123.5,137.4,153.2,93.8,99.3,95.0,95.6,107.7,106.7,117.4,118.9,118.0,95.2,95.8,107.8,106.7,117.3,119.0,118.3,105.9,116.3,131.9,93.7,99.3,95.0,95.6,107.7,106.8,117.3,118.9,117.9,116.4,123.0,138.7,98.8,108.5,103.9,310.1,420.9,90.8,96.1,86.8,84.0,127.3,135.8) > 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 123.5 107.4 100.2 122.0 123.5 93.8 95.6 117.4 95.2 106.7 118.3 [2,] 126.0 137.4 84.6 104.4 126.0 137.4 99.3 107.7 118.9 95.8 117.3 105.9 [3,] 127.4 153.2 98.0 93.9 127.4 153.2 95.0 106.7 118.0 107.8 119.0 116.3 [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 131.9 95.0 106.8 117.9 138.7 103.9 90.8 84.0 NA [2,] 93.7 95.6 117.3 116.4 98.8 310.1 96.1 127.3 NA [3,] 99.3 107.7 118.9 123.0 108.5 420.9 86.8 135.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 4.0 13.9 -22.8 4.2 4.0 13.9 5.5 12.1 1.5 0.6 10.6 -12.4 -38.2 [2,] 1.4 15.8 13.4 -10.5 1.4 15.8 -4.3 -1.0 -0.9 12.0 1.7 10.4 5.6 [3,] -3.9 -45.8 2.2 28.1 -3.9 -59.4 0.6 10.7 -22.8 -1.1 -0.7 15.6 -4.3 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 0.6 10.5 -1.5 -39.9 206.2 5.3 43.3 NA [2,] 12.1 1.6 6.6 9.7 110.8 -9.3 8.5 NA [3,] -0.9 -1.0 15.7 -4.6 -330.1 -2.8 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/14rus1321388553.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/2gkck1321388553.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/3hhyk1321388553.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/4o3qj1321388553.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,] 84.0 84.60 86.80 [2,] 95.4 97.45 103.00 [3,] 107.1 112.05 117.15 [4,] 122.0 126.00 127.40 [5,] 138.7 137.40 153.20 $n [1] 20 20 20 $conf [,1] [,2] [,3] [1,] 97.70225 101.9633 108.5295 [2,] 116.49775 122.1367 125.7705 $out [1] 310.1 420.9 $group [1] 2 3 $names [1] "1" "2" "3" > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/52dpk1321388553.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,] -12.40 -10.50 -4.60 [2,] -0.45 0.25 -4.45 [3,] 4.10 6.10 -1.10 [4,] 11.35 12.05 1.40 [5,] 13.90 15.80 2.20 $n [1] 20 20 19 $conf [,1] [,2] [,3] [1,] -0.06892514 1.931075 -3.22049 [2,] 8.26892514 10.268925 1.02049 $out [1] -22.8 -38.2 -39.9 206.2 43.3 110.8 -45.8 28.1 -59.4 10.7 [11] -22.8 15.6 15.7 -330.1 $group [1] 1 1 1 1 1 2 3 3 3 3 3 3 3 3 $names [1] "1" "2" "3" > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/68iq61321388553.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,] 122.0 123.50 84.6 93.90 122.0 123.50 93.80 95.60 117.40 95.2 106.70 [2,] 124.0 130.45 91.3 97.05 124.0 130.45 94.40 101.15 117.70 95.5 112.00 [3,] 126.0 137.40 98.0 100.20 126.0 137.40 95.00 106.70 118.00 95.8 117.30 [4,] 126.7 145.30 102.7 102.30 126.7 145.30 97.15 107.20 118.45 101.8 118.15 [5,] 127.4 153.20 107.4 104.40 127.4 153.20 99.30 107.70 118.90 107.8 119.00 [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 105.9 93.7 95.00 106.80 116.40 98.80 103.9 86.80 84.00 NA [2,] 111.1 96.5 95.30 112.05 117.15 103.65 207.0 88.80 105.65 NA [3,] 116.3 99.3 95.60 117.30 117.90 108.50 310.1 90.80 127.30 NA [4,] 117.3 115.6 101.65 118.10 120.45 123.60 365.5 93.45 131.55 NA [5,] 118.3 131.9 107.70 118.90 123.00 138.70 420.9 96.10 135.80 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,] 123.537 123.8536 87.60077 95.41088 123.537 123.8536 92.49141 101.1811 [2,] 128.463 150.9464 108.39923 104.98912 128.463 150.9464 97.50859 112.2189 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 117.3158 90.05306 111.6899 110.6443 81.87672 89.80744 111.7811 114.8897 [2,] 118.6842 101.54694 122.9101 121.9557 116.72328 101.39256 122.8189 120.9103 [,17] [,18] [,19] [,20] [,21] [1,] 90.30134 165.5142 86.55821 103.6737 NA [2,] 126.69866 454.6858 95.04179 150.9263 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(122, 124, 126, 126.7, 127.4, 123.5, 130.45, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/71oof1321388553.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,] 109.730 107.100 108.7500 [2,] 115.265 109.575 110.4062 [3,] 120.800 112.050 112.0625 [4,] 125.820 114.600 114.0938 [5,] 130.840 117.150 116.1250 $n [1] 3 3 3 $conf [,1] [,2] [,3] [1,] 111.1716 107.4661 108.6987 [2,] 130.4284 116.6339 115.4263 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(109.73, 115.265, 120.8, 125.82, 130.84, 107.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/14rus1321388553.ps tmp/14rus1321388553.png",intern=TRUE)) character(0) > try(system("convert tmp/2gkck1321388553.ps tmp/2gkck1321388553.png",intern=TRUE)) character(0) > try(system("convert tmp/3hhyk1321388553.ps tmp/3hhyk1321388553.png",intern=TRUE)) character(0) > try(system("convert tmp/4o3qj1321388553.ps tmp/4o3qj1321388553.png",intern=TRUE)) character(0) > try(system("convert tmp/52dpk1321388553.ps tmp/52dpk1321388553.png",intern=TRUE)) character(0) > try(system("convert tmp/68iq61321388553.ps tmp/68iq61321388553.png",intern=TRUE)) character(0) > try(system("convert tmp/71oof1321388553.ps tmp/71oof1321388553.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.532 0.341 1.895