R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-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(100.44,100.47,100.49,100.52,100.47,100.48,100.48,100.53,100.62,100.89,100.97,101.01,101.02,100.92,100.93,100.98,101.07,101.1,101.11,101.19,101.31,101.52,101.61,101.65,101.66,101.56,101.75,101.83,101.98,102.06,102.07,102.1,102.42,102.91,103.14,103.23,103.23,102.91,103.11,103.14,103.26,103.3,103.32,103.44,103.54,103.98,104.24,104.29,104.29,103.98,103.98,103.89,103.86,103.88,103.88,104.31,104.41,104.8,104.89,104.9,104.9,104.54,104.67,104.87,105.04,105.09,105.1,105.46,105.83,106.27,106.46,106.52,106.53,105.96,106,106.15,106.32,106.41,106.41,106.81,106.99,107.35,107.53,107.56) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 100.44 101.02 101.66 103.23 104.29 104.90 106.53 NA [2,] 100.47 100.92 101.56 102.91 103.98 104.54 105.96 NA [3,] 100.49 100.93 101.75 103.11 103.98 104.67 106.00 NA [4,] 100.52 100.98 101.83 103.14 103.89 104.87 106.15 NA [5,] 100.47 101.07 101.98 103.26 103.86 105.04 106.32 NA [6,] 100.48 101.10 102.06 103.30 103.88 105.09 106.41 NA [7,] 100.48 101.11 102.07 103.32 103.88 105.10 106.41 NA [8,] 100.53 101.19 102.10 103.44 104.31 105.46 106.81 NA [9,] 100.62 101.31 102.42 103.54 104.41 105.83 106.99 NA [10,] 100.89 101.52 102.91 103.98 104.80 106.27 107.35 NA [11,] 100.97 101.61 103.14 104.24 104.89 106.46 107.53 NA [12,] 101.01 101.65 103.23 104.29 104.90 106.52 107.56 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.03 -0.10 -0.10 -0.32 -0.31 -0.36 -0.57 NA [2,] 0.02 0.01 0.19 0.20 0.00 0.13 0.04 NA [3,] 0.03 0.05 0.08 0.03 -0.09 0.20 0.15 NA [4,] -0.05 0.09 0.15 0.12 -0.03 0.17 0.17 NA [5,] 0.01 0.03 0.08 0.04 0.02 0.05 0.09 NA [6,] 0.00 0.01 0.01 0.02 0.00 0.01 0.00 NA [7,] 0.05 0.08 0.03 0.12 0.43 0.36 0.40 NA [8,] 0.09 0.12 0.32 0.10 0.10 0.37 0.18 NA [9,] 0.27 0.21 0.49 0.44 0.39 0.44 0.36 NA [10,] 0.08 0.09 0.23 0.26 0.09 0.19 0.18 NA [11,] 0.04 0.04 0.09 0.05 0.01 0.06 0.03 NA [12,] 0.01 0.01 0.00 0.00 0.00 0.01 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/1m3hi1381737270.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/2bi611381737270.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/3mc511381737270.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/4vltn1381737270.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] [1,] 100.440 100.47 100.490 100.520 100.470 100.480 100.48 100.530 100.620 [2,] 101.340 101.24 101.340 101.405 101.525 101.580 101.59 101.645 101.865 [3,] 103.230 102.91 103.110 103.140 103.260 103.300 103.32 103.440 103.540 [4,] 104.595 104.26 104.325 104.380 104.450 104.485 104.49 104.885 105.120 [5,] 106.530 105.96 106.000 106.150 106.320 106.410 106.41 106.810 106.990 [,10] [,11] [,12] [1,] 100.890 100.970 101.01 [2,] 102.215 102.375 102.44 [3,] 103.980 104.240 104.29 [4,] 105.535 105.675 105.71 [5,] 107.350 107.530 107.56 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 101.2862 101.1065 101.3274 101.3634 101.5132 101.5652 101.5882 101.5051 [2,] 105.1738 104.7135 104.8926 104.9166 105.0068 105.0348 105.0518 105.3749 [,9] [,10] [,11] [,12] [1,] 101.5962 101.9973 102.2693 102.3372 [2,] 105.4838 105.9627 106.2107 106.2428 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(100.44, 101.34, 103.23, 104.595, 106.53, 100.47, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/57z5q1381737270.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.57 0.000 -0.090 -0.05 0.010 0.00 0.030 0.09 0.210 0.08 0.010 0.000 [2,] -0.34 0.015 0.030 0.03 0.025 0.00 0.065 0.10 0.315 0.09 0.035 0.000 [3,] -0.31 0.040 0.050 0.12 0.040 0.01 0.120 0.12 0.390 0.18 0.040 0.005 [4,] -0.10 0.160 0.115 0.16 0.065 0.01 0.380 0.25 0.440 0.21 0.055 0.010 [5,] 0.03 0.200 0.200 0.17 0.090 0.02 0.430 0.37 0.490 0.26 0.060 0.010 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4533241 -0.04659166 -0.0007606287 0.0423661 0.01611265 0.004028161 [2,] -0.1666759 0.12659166 0.1007606287 0.1976339 0.06388735 0.015971839 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.06811292 0.03042242 0.315352 0.1083379 0.02805632 -0.001450323 [2,] 0.30811292 0.20957758 0.464648 0.2516621 0.05194368 0.011450323 $out [1] 0.09 $group [1] 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.570000000000007, -0.340000000000003, -0.310000000000002, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6pmr41381737270.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] [1,] 100.440 100.920 101.560 102.910 103.860 104.540 105.960 NA [2,] 100.475 101.000 101.790 103.185 103.885 104.885 106.235 NA [3,] 100.505 101.105 102.065 103.310 104.135 105.095 106.470 NA [4,] 100.755 101.415 102.665 103.760 104.605 106.050 107.170 NA [5,] 101.010 101.650 103.230 104.290 104.900 106.520 107.560 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 100.3773 100.9157 101.6659 103.0477 103.8066 104.5636 106.0435 NA [2,] 100.6327 101.2943 102.4641 103.5723 104.4634 105.6264 106.8965 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(100.44, 100.475, 100.505, 100.755, 101.01, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7cm0z1381737270.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,] 102.9057 102.910 102.7500 [2,] 103.0986 103.185 102.9300 [3,] 103.1921 103.310 103.0362 [4,] 103.7743 103.760 103.6838 [5,] 104.1657 104.290 104.0750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 102.8839 103.0477 102.6925 [2,] 103.5003 103.5723 103.3800 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(102.905714285714, 103.098571428571, 103.192142857143, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1m3hi1381737270.ps tmp/1m3hi1381737270.png",intern=TRUE)) character(0) > try(system("convert tmp/2bi611381737270.ps tmp/2bi611381737270.png",intern=TRUE)) character(0) > try(system("convert tmp/3mc511381737270.ps tmp/3mc511381737270.png",intern=TRUE)) character(0) > try(system("convert tmp/4vltn1381737270.ps tmp/4vltn1381737270.png",intern=TRUE)) character(0) > try(system("convert tmp/57z5q1381737270.ps tmp/57z5q1381737270.png",intern=TRUE)) character(0) > try(system("convert tmp/6pmr41381737270.ps tmp/6pmr41381737270.png",intern=TRUE)) character(0) > try(system("convert tmp/7cm0z1381737270.ps tmp/7cm0z1381737270.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.966 0.845 4.794