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(2591,2664,2723,2811,2809,2914,2952,3182,3152,3491,3683,3735,3808,3801,3815,3933,3827,3903,3870,3853,3849,3917,4050,4130,4111,4074,3993,4276,4322,4506,4402,4340,4279,4192,4200,3905,3878,3804,3912,3796,3875,3822,3739,3772,3740,3733,3714,3652,3591,3641,3487,3357,3312,3311,3240,3322,3431,3301,3318,3284) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 60 > (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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2591 3808 4111 3878 3591 NA [2,] 2664 3801 4074 3804 3641 NA [3,] 2723 3815 3993 3912 3487 NA [4,] 2811 3933 4276 3796 3357 NA [5,] 2809 3827 4322 3875 3312 NA [6,] 2914 3903 4506 3822 3311 NA [7,] 2952 3870 4402 3739 3240 NA [8,] 3182 3853 4340 3772 3322 NA [9,] 3152 3849 4279 3740 3431 NA [10,] 3491 3917 4192 3733 3301 NA [11,] 3683 4050 4200 3714 3318 NA [12,] 3735 4130 3905 3652 3284 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 73 -7 -37 -74 50 NA [2,] 59 14 -81 108 -154 NA [3,] 88 118 283 -116 -130 NA [4,] -2 -106 46 79 -45 NA [5,] 105 76 184 -53 -1 NA [6,] 38 -33 -104 -83 -71 NA [7,] 230 -17 -62 33 82 NA [8,] -30 -4 -61 -32 109 NA [9,] 339 68 -87 -7 -130 NA [10,] 192 133 8 -19 17 NA [11,] 52 80 -295 -62 -34 NA [12,] 73 -19 -27 -61 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/18q6d1321200482.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/2cz3o1321200482.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/3neny1321200482.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/4j3kp1321200482.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,] 3591 3641 3487 2811 2809 2914 2952 3182 3152 3301 3318 3284 [2,] 3591 3641 3487 3357 3312 3311 3240 3322 3431 3491 3683 3652 [3,] 3808 3801 3815 3796 3827 3822 3739 3772 3740 3733 3714 3735 [4,] 3878 3804 3912 3933 3875 3903 3870 3853 3849 3917 4050 3905 [5,] 4111 3804 3993 4276 4322 4506 4402 4340 4279 4192 4200 4130 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3605.207 3685.825 3514.696 3389 3429.186 3403.694 3293.844 3396.797 [2,] 4010.793 3916.175 4115.304 4203 4224.814 4240.306 4184.156 4147.203 [,9] [,10] [,11] [,12] [1,] 3444.642 3431.989 3454.679 3556.231 [2,] 4035.358 4034.011 3973.321 3913.769 $out [1] 2591 2664 4074 2723 $group [1] 1 2 2 3 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(3591, 3591, 3808, 3878, 4111, 3641, 3641, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5r5c51321200482.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,] -74 -154 -130 -106 -53 -104 -62 -61 -130 -19 -62 -61 [2,] -37 -81 -116 -45 -1 -83 -17 -32 -87 8 -62 -44 [3,] -7 14 88 -2 76 -71 33 -30 -7 17 -34 -23 [4,] 50 59 118 46 105 -33 82 -4 68 133 52 27 [5,] 73 108 283 79 184 38 230 -4 68 192 80 73 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -68.47398 -84.92365 -77.34381 -66.30037 1.100667 -106.32987 -36.95315 [2,] 54.47398 112.92365 253.34381 62.30037 150.899333 -35.67013 102.95315 [,8] [,9] [,10] [,11] [,12] [1,] -49.78473 -116.5226 -71.32469 -114.55211 -79.09 [2,] -10.21527 102.5226 105.32469 46.55211 33.09 $out [1] 109 339 -295 $group [1] 8 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-74, -37, -7, 50, 73, -154, -81, 14, 59, 108, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6nbdt1321200482.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,] 2591.0 3801.0 3905.0 3652.0 3240 NA [2,] 2766.0 3821.0 4092.5 3736.0 3306 NA [3,] 2933.0 3861.5 4238.0 3784.0 3320 NA [4,] 3336.5 3925.0 4331.0 3848.5 3459 NA [5,] 3735.0 4050.0 4506.0 3912.0 3641 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2672.791 3814.065 4129.219 3732.688 3250.216 NA [2,] 3193.209 3908.935 4346.781 3835.312 3389.784 NA $out [1] 4130 $group [1] 2 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(2591, 2766, 2933, 3336.5, 3735, 3801, 3821, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7wuok1321200482.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,] 3586.0 3714.0 3555.00 [2,] 3612.9 3737.0 3600.25 [3,] 3665.4 3784.0 3672.25 [4,] 3710.3 3811.5 3728.50 [5,] 3793.0 3827.0 3866.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 3620.975 3750.02 3613.754 [2,] 3709.825 3817.98 3730.746 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(3586, 3612.9, 3665.4, 3710.3, 3793, 3714, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/18q6d1321200482.ps tmp/18q6d1321200482.png",intern=TRUE)) character(0) > try(system("convert tmp/2cz3o1321200482.ps tmp/2cz3o1321200482.png",intern=TRUE)) character(0) > try(system("convert tmp/3neny1321200482.ps tmp/3neny1321200482.png",intern=TRUE)) character(0) > try(system("convert tmp/4j3kp1321200482.ps tmp/4j3kp1321200482.png",intern=TRUE)) character(0) > try(system("convert tmp/5r5c51321200482.ps tmp/5r5c51321200482.png",intern=TRUE)) character(0) > try(system("convert tmp/6nbdt1321200482.ps tmp/6nbdt1321200482.png",intern=TRUE)) character(0) > try(system("convert tmp/7wuok1321200482.ps tmp/7wuok1321200482.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.602 0.311 1.944