R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.55,1.6,1.65,1.7,1.75,1.8,1.85,1.8,1.8,1.8,1.8,1.8,1.8,1.75,1.7,1.65,1.6,1.6,1.6,1.6,1.6,1.6,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4,2.5,2.5,2.5,2.4,2.3,2.2,2.1,1.9,1.7,1.5,1.6,1.6,1.6,1.6,1.65,1.7,1.75,1.75,1.75,1.75,1.8,1.9,1.8,1.7,1.6,1.6,1.6,1.6,1.6,1.7,1.8,1.9,2,2.1) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 72 > (np <- floor(n / par1)) [1] 6 > 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 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.20 1.80 1.6 2.3 1.60 1.8 NA [2,] 1.25 1.85 1.6 2.4 1.60 1.7 NA [3,] 1.30 1.80 1.6 2.5 1.60 1.6 NA [4,] 1.35 1.80 1.6 2.5 1.60 1.6 NA [5,] 1.40 1.80 1.6 2.5 1.65 1.6 NA [6,] 1.45 1.80 1.6 2.4 1.70 1.6 NA [7,] 1.50 1.80 1.7 2.3 1.75 1.6 NA [8,] 1.55 1.80 1.8 2.2 1.75 1.7 NA [9,] 1.60 1.75 1.9 2.1 1.75 1.8 NA [10,] 1.65 1.70 2.0 1.9 1.75 1.9 NA [11,] 1.70 1.65 2.1 1.7 1.80 2.0 NA [12,] 1.75 1.60 2.2 1.5 1.90 2.1 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.05 0.05 0.0 0.1 0.00 -0.1 NA [2,] 0.05 -0.05 0.0 0.1 0.00 -0.1 NA [3,] 0.05 0.00 0.0 0.0 0.00 0.0 NA [4,] 0.05 0.00 0.0 0.0 0.05 0.0 NA [5,] 0.05 0.00 0.0 -0.1 0.05 0.0 NA [6,] 0.05 0.00 0.1 -0.1 0.05 0.0 NA [7,] 0.05 0.00 0.1 -0.1 0.00 0.1 NA [8,] 0.05 -0.05 0.1 -0.1 0.00 0.1 NA [9,] 0.05 -0.05 0.1 -0.2 0.00 0.1 NA [10,] 0.05 -0.05 0.1 -0.2 0.05 0.1 NA [11,] 0.05 -0.05 0.1 -0.2 0.10 0.1 NA [12,] 0.05 0.00 0.1 0.1 -0.10 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/www/rcomp/tmp/1aof31321376566.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/www/rcomp/tmp/2tpfj1321376566.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/www/rcomp/tmp/3wpnq1321376566.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/www/rcomp/tmp/4t09b1321376566.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,] 1.6 1.25 1.6 1.35 1.400 1.45 1.500 1.550 1.600 1.650 1.65 1.500 [2,] 1.6 1.60 1.6 1.60 1.600 1.60 1.600 1.700 1.750 1.700 1.70 1.600 [3,] 1.7 1.65 1.6 1.60 1.625 1.65 1.725 1.775 1.775 1.825 1.75 1.825 [4,] 1.8 1.85 1.8 1.80 1.800 1.80 1.800 1.800 1.900 1.900 2.00 2.100 [5,] 1.8 1.85 1.8 1.80 1.800 1.80 1.800 1.800 2.100 2.000 2.10 2.200 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.570994 1.488742 1.470994 1.470994 1.495994 1.520994 1.595994 1.710497 [2,] 1.829006 1.811258 1.729006 1.729006 1.754006 1.779006 1.854006 1.839503 [,9] [,10] [,11] [,12] [1,] 1.678245 1.695994 1.556490 1.502484 [2,] 1.871755 1.954006 1.943510 2.147516 $out [1] 1.2 2.3 2.4 1.3 2.5 2.5 2.5 2.4 2.3 2.2 $group [1] 1 1 2 3 3 4 5 6 7 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.6, 1.6, 1.7, 1.8, 1.8, 1.25, 1.6, 1.65, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/532dp1321376566.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,] 0.000 -0.10 0 0.00 0.00 0.000 -0.100 -0.100 -0.200 -0.20 -0.200 -0.10 [2,] 0.000 -0.05 0 0.00 0.00 0.000 0.000 -0.050 -0.050 -0.05 -0.050 0.00 [3,] 0.025 0.00 0 0.00 0.00 0.025 0.025 0.025 0.025 0.05 0.075 0.05 [4,] 0.050 0.05 0 0.05 0.05 0.050 0.100 0.100 0.100 0.10 0.100 0.10 [5,] 0.100 0.10 0 0.05 0.05 0.100 0.100 0.100 0.100 0.10 0.100 0.10 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.007251615 -0.06450323 0 -0.03225161 -0.03225161 -0.007251615 [2,] 0.057251615 0.06450323 0 0.03225161 0.03225161 0.057251615 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.03950323 -0.07175484 -0.07175484 -0.04675484 -0.02175484 -0.02065975 [2,] 0.08950323 0.12175484 0.12175484 0.14675484 0.17175484 0.12065975 $out [1] -0.10 0.05 -0.10 -0.10 $group [1] 1 3 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 0, 0.025, 0.05, 0.1, -0.0999999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/605qa1321376566.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] [1,] 1.200 1.650 1.60 1.50 1.600 1.60 NA [2,] 1.325 1.725 1.60 2.00 1.600 1.60 NA [3,] 1.475 1.800 1.65 2.30 1.725 1.70 NA [4,] 1.625 1.800 1.95 2.45 1.750 1.85 NA [5,] 1.750 1.850 2.20 2.50 1.900 2.10 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.338168 1.765792 1.490363 2.094752 1.656584 1.585973 NA [2,] 1.611832 1.834208 1.809637 2.505248 1.793416 1.814027 NA $out [1] 1.6 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(1.2, 1.325, 1.475, 1.625, 1.75, 1.65, 1.725, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7h29y1321376566.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,] 1.716667 1.6000 1.675000 [2,] 1.737500 1.6375 1.684375 [3,] 1.766667 1.7125 1.706250 [4,] 1.816667 1.7750 1.809375 [5,] 1.841667 1.8250 1.843750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1.730558 1.649785 1.649237 [2,] 1.802775 1.775215 1.763263 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1.71666666666667, 1.7375, 1.76666666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1aof31321376566.ps tmp/1aof31321376566.png",intern=TRUE)) character(0) > try(system("convert tmp/2tpfj1321376566.ps tmp/2tpfj1321376566.png",intern=TRUE)) character(0) > try(system("convert tmp/3wpnq1321376566.ps tmp/3wpnq1321376566.png",intern=TRUE)) character(0) > try(system("convert tmp/4t09b1321376566.ps tmp/4t09b1321376566.png",intern=TRUE)) character(0) > try(system("convert tmp/532dp1321376566.ps tmp/532dp1321376566.png",intern=TRUE)) character(0) > try(system("convert tmp/605qa1321376566.ps tmp/605qa1321376566.png",intern=TRUE)) character(0) > try(system("convert tmp/7h29y1321376566.ps tmp/7h29y1321376566.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.450 0.330 2.759