R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(21.94,21.95,21.96,22.1,22.13,22.18,22.18,22.27,22.3,22.04,22.05,22.06,22.06,22.06,21.97,22.03,22.08,22.13,22.13,22.4,22.4,22.12,22.22,22.14,22.14,22.19,22.29,22.24,22.26,22.29,22.29,22.29,22.29,22.35,22.39,22.43,22.43,22.11,22.12,22.05,22.05,22.08,22.08,22.09,22.09,22.24,22.25,22.24,22.24,22.25,22.28,22.23,22.29,22.31,22.31,22.31,22.39,22.42,22.42,22.42,22.15,21.95,21.96,21.97,21.66,21.66,21.68,21.75,21.55,21.59,21.54,21.54) > 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,] 21.94 22.06 22.14 22.43 22.24 22.15 NA [2,] 21.95 22.06 22.19 22.11 22.25 21.95 NA [3,] 21.96 21.97 22.29 22.12 22.28 21.96 NA [4,] 22.10 22.03 22.24 22.05 22.23 21.97 NA [5,] 22.13 22.08 22.26 22.05 22.29 21.66 NA [6,] 22.18 22.13 22.29 22.08 22.31 21.66 NA [7,] 22.18 22.13 22.29 22.08 22.31 21.68 NA [8,] 22.27 22.40 22.29 22.09 22.31 21.75 NA [9,] 22.30 22.40 22.29 22.09 22.39 21.55 NA [10,] 22.04 22.12 22.35 22.24 22.42 21.59 NA [11,] 22.05 22.22 22.39 22.25 22.42 21.54 NA [12,] 22.06 22.14 22.43 22.24 22.42 21.54 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.01 0.00 0.05 -0.32 0.01 -0.20 NA [2,] 0.01 -0.09 0.10 0.01 0.03 0.01 NA [3,] 0.14 0.06 -0.05 -0.07 -0.05 0.01 NA [4,] 0.03 0.05 0.02 0.00 0.06 -0.31 NA [5,] 0.05 0.05 0.03 0.03 0.02 0.00 NA [6,] 0.00 0.00 0.00 0.00 0.00 0.02 NA [7,] 0.09 0.27 0.00 0.01 0.00 0.07 NA [8,] 0.03 0.00 0.00 0.00 0.08 -0.20 NA [9,] -0.26 -0.28 0.06 0.15 0.03 0.04 NA [10,] 0.01 0.10 0.04 0.01 0.00 -0.05 NA [11,] 0.01 -0.08 0.04 -0.01 0.00 0.00 NA [12,] 0.00 0.00 0.00 0.00 -0.27 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/1eg451419972129.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/2855n1419972129.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/389kt1419972129.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/4z44k1419972129.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] [1,] 21.940 21.950 21.960 21.970 22.050 22.080 22.080 22.09 22.090 21.59 21.540 [2,] 22.060 21.950 21.960 22.030 22.050 22.080 22.080 22.09 22.090 22.04 22.050 [3,] 22.145 22.085 22.045 22.075 22.105 22.155 22.155 22.28 22.295 22.18 22.235 [4,] 22.240 22.190 22.280 22.230 22.260 22.290 22.290 22.31 22.390 22.35 22.390 [5,] 22.430 22.250 22.290 22.240 22.290 22.310 22.310 22.40 22.400 22.42 22.420 [,12] [1,] 21.54 [2,] 22.06 [3,] 22.19 [4,] 22.42 [5,] 22.43 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 22.02889 21.93019 21.83859 21.94599 21.96954 22.01954 22.01954 22.13809 [2,] 22.26111 22.23981 22.25141 22.20401 22.24046 22.29046 22.29046 22.42191 [,9] [,10] [,11] [,12] [1,] 22.10149 21.98004 22.01569 21.95779 [2,] 22.48851 22.37996 22.45431 22.42221 $out [1] 21.66 21.66 21.68 21.75 21.55 $group [1] 5 6 7 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(21.94, 22.06, 22.145, 22.24, 22.43, 21.95, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5yted1419972129.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.320 0.01 -0.07 0.000 0.00 0 0.00 0.00 -0.280 -0.05 -0.01 0 [2,] -0.200 0.01 -0.05 0.000 0.02 0 0.00 0.00 -0.260 0.00 -0.01 0 [3,] 0.005 0.01 -0.02 0.025 0.03 0 0.04 0.00 0.035 0.01 0.00 0 [4,] 0.010 0.03 0.06 0.050 0.05 0 0.09 0.03 0.060 0.04 0.01 0 [5,] 0.050 0.03 0.14 0.060 0.05 0 0.09 0.03 0.150 0.10 0.01 0 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.1304568 -0.002900646 -0.09095355 -0.007251615 0.01064903 0 [2,] 0.1404568 0.022900646 0.05095355 0.057251615 0.04935097 0 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.01805291 -0.01935097 -0.1714103 -0.01580129 -0.01290065 0 [2,] 0.09805291 0.01935097 0.2414103 0.03580129 0.01290065 0 $out [1] -0.09 0.10 -0.31 0.02 0.27 0.08 -0.20 -0.08 0.04 -0.27 $group [1] 2 2 4 6 7 8 8 11 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.32, -0.199999999999999, 0.00499999999999901, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6wycd1419972129.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,] 21.94 21.970 22.19 22.05 22.230 21.540 NA [2,] 22.00 22.060 22.25 22.08 22.265 21.570 NA [3,] 22.08 22.125 22.29 22.10 22.310 21.670 NA [4,] 22.18 22.180 22.32 22.24 22.405 21.955 NA [5,] 22.30 22.220 22.39 22.43 22.420 22.150 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 21.9979 22.07027 22.25807 22.02702 22.24615 21.4944 NA [2,] 22.1621 22.17973 22.32193 22.17298 22.37385 21.8456 NA $out [1] 22.40 22.40 22.14 22.43 $group [1] 2 2 3 3 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(21.94, 22, 22.08, 22.18, 22.3, 21.97, 22.06, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7kqk61419972129.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,] 22.07833 22.0450 22.07375 [2,] 22.10000 22.0950 22.12937 [3,] 22.11917 22.1550 22.17750 [4,] 22.15250 22.2125 22.22188 [5,] 22.18500 22.2950 22.25375 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 22.09522 22.10141 22.13531 [2,] 22.14311 22.20859 22.21969 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(22.0783333333333, 22.1, 22.1191666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1eg451419972129.ps tmp/1eg451419972129.png",intern=TRUE)) character(0) > try(system("convert tmp/2855n1419972129.ps tmp/2855n1419972129.png",intern=TRUE)) character(0) > try(system("convert tmp/389kt1419972129.ps tmp/389kt1419972129.png",intern=TRUE)) character(0) > try(system("convert tmp/4z44k1419972129.ps tmp/4z44k1419972129.png",intern=TRUE)) character(0) > try(system("convert tmp/5yted1419972129.ps tmp/5yted1419972129.png",intern=TRUE)) character(0) > try(system("convert tmp/6wycd1419972129.ps tmp/6wycd1419972129.png",intern=TRUE)) character(0) > try(system("convert tmp/7kqk61419972129.ps tmp/7kqk61419972129.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.902 0.566 3.489