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(94.67,94.6,93.9,93.41,93.37,93.35,93.08,93.05,92.61,92.37,92.24,91.95,92.63,92.7,92.47,92.58,92.55,92.56,89.92,89.96,90.03,90.31,90.8,90.36,90.31,93.8,93.95,93.99,94.44,94.15,91.91,91.86,93.12,93.47,93.57,94.57,95.85,96.62,95.69,95.39,95.14,95.07,94.21,95.4,95.1,94.89,95.43,94.88,96.03,96.37,96.04,95.72,95.74,95.78,93.66,95.29,94.33,95.66,95.2,94.61,96.21,96.27,95.12,95.55,93.51,92.86,92.45,93.34,92.01,91.77,92.19,91.97) > 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,] 94.67 92.63 90.31 95.85 96.03 96.21 NA [2,] 94.60 92.70 93.80 96.62 96.37 96.27 NA [3,] 93.90 92.47 93.95 95.69 96.04 95.12 NA [4,] 93.41 92.58 93.99 95.39 95.72 95.55 NA [5,] 93.37 92.55 94.44 95.14 95.74 93.51 NA [6,] 93.35 92.56 94.15 95.07 95.78 92.86 NA [7,] 93.08 89.92 91.91 94.21 93.66 92.45 NA [8,] 93.05 89.96 91.86 95.40 95.29 93.34 NA [9,] 92.61 90.03 93.12 95.10 94.33 92.01 NA [10,] 92.37 90.31 93.47 94.89 95.66 91.77 NA [11,] 92.24 90.80 93.57 95.43 95.20 92.19 NA [12,] 91.95 90.36 94.57 94.88 94.61 91.97 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.07 0.07 3.49 0.77 0.34 0.06 NA [2,] -0.70 -0.23 0.15 -0.93 -0.33 -1.15 NA [3,] -0.49 0.11 0.04 -0.30 -0.32 0.43 NA [4,] -0.04 -0.03 0.45 -0.25 0.02 -2.04 NA [5,] -0.02 0.01 -0.29 -0.07 0.04 -0.65 NA [6,] -0.27 -2.64 -2.24 -0.86 -2.12 -0.41 NA [7,] -0.03 0.04 -0.05 1.19 1.63 0.89 NA [8,] -0.44 0.07 1.26 -0.30 -0.96 -1.33 NA [9,] -0.24 0.28 0.35 -0.21 1.33 -0.24 NA [10,] -0.13 0.49 0.10 0.54 -0.46 0.42 NA [11,] -0.29 -0.44 1.00 -0.55 -0.59 -0.22 NA [12,] 0.68 -0.05 1.28 1.15 1.60 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/1y8d51432671994.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/2n2yi1432671994.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/33phx1432671994.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/4m6pw1432671994.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,] 90.31 92.700 92.470 92.58 92.550 92.56 89.920 89.960 90.030 90.31 90.800 [2,] 92.63 93.800 93.900 93.41 93.370 92.86 91.910 91.860 92.010 91.77 92.190 [3,] 95.26 95.435 94.535 94.69 93.975 93.75 92.765 93.195 92.865 92.92 92.905 [4,] 96.03 96.370 95.690 95.55 95.140 95.07 93.660 95.290 94.330 94.89 95.200 [5,] 96.21 96.620 96.040 95.72 95.740 95.78 94.210 95.400 95.100 95.66 95.430 [,12] [1,] 90.36 [2,] 91.95 [3,] 93.27 [4,] 94.61 [5,] 94.88 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 93.06689 93.77727 93.38039 93.30963 92.83329 92.32448 91.63619 90.98254 [2,] 97.45311 97.09273 95.68961 96.07037 95.11671 95.17552 93.89381 95.40746 [,9] [,10] [,11] [,12] [1,] 91.36853 90.9075 90.96345 91.55421 [2,] 94.36147 94.9325 94.84655 94.98579 $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(90.31, 92.63, 95.26, 96.03, 96.21, 92.7, 93.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5vbr11432671994.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] [1,] -0.070 -1.150 -0.49 -0.250 -0.650 -2.64 -0.050 -1.33 -0.240 -0.46 -0.590 [2,] 0.060 -0.930 -0.32 -0.250 -0.290 -2.24 -0.030 -0.96 -0.240 -0.13 -0.550 [3,] 0.205 -0.515 -0.13 -0.035 -0.045 -1.49 0.465 -0.37 0.035 0.26 -0.365 [4,] 0.770 -0.230 0.11 0.020 0.010 -0.41 1.190 0.07 0.350 0.49 -0.220 [5,] 0.770 0.150 0.43 0.020 0.040 -0.27 1.630 1.26 0.350 0.54 -0.220 [,12] [1,] -0.05 [2,] 0.68 [3,] 1.15 [4,] 1.28 [5,] 1.60 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2529729 -0.96652261 -0.4073639 -0.2091587 -0.2385097 -2.6704091 [2,] 0.6629729 -0.06347739 0.1473639 0.1391587 0.1485097 -0.3095909 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.3219394 -1.0343833 -0.3455691 -0.13992 -0.5778607 0.7260415 [2,] 1.2519394 0.2943833 0.4155691 0.65992 -0.1521393 1.5739585 $out [1] 3.49 0.45 -2.04 1.33 1.00 $group [1] 1 4 4 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0700000000000074, 0.0600000000000023, 0.205000000000005, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6fsjr1432671994.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,] 91.950 89.920 90.310 94.210 93.660 91.770 NA [2,] 92.490 90.170 92.515 94.980 94.905 92.100 NA [3,] 93.215 91.635 93.685 95.265 95.690 93.100 NA [4,] 93.655 92.570 94.070 95.560 95.905 95.335 NA [5,] 94.670 92.700 94.570 95.850 96.370 96.270 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.68364 90.54034 92.97575 95.00046 95.23389 91.62449 NA [2,] 93.74636 92.72966 94.39425 95.52954 96.14611 94.57551 NA $out [1] 96.62 $group [1] 4 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(91.95, 92.49, 93.215, 93.655, 94.67, 89.92, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7k5l61432671994.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,] 92.53833 92.7650 92.78000 [2,] 93.06750 92.9125 93.25250 [3,] 93.60000 93.5100 93.70437 [4,] 94.36167 94.6125 94.54750 [5,] 95.06000 95.4350 95.17250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 93.00972 92.73462 93.11372 [2,] 94.19028 94.28538 94.29503 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(92.5383333333333, 93.0675, 93.6, 94.3616666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1y8d51432671994.ps tmp/1y8d51432671994.png",intern=TRUE)) character(0) > try(system("convert tmp/2n2yi1432671994.ps tmp/2n2yi1432671994.png",intern=TRUE)) character(0) > try(system("convert tmp/33phx1432671994.ps tmp/33phx1432671994.png",intern=TRUE)) character(0) > try(system("convert tmp/4m6pw1432671994.ps tmp/4m6pw1432671994.png",intern=TRUE)) character(0) > try(system("convert tmp/5vbr11432671994.ps tmp/5vbr11432671994.png",intern=TRUE)) character(0) > try(system("convert tmp/6fsjr1432671994.ps tmp/6fsjr1432671994.png",intern=TRUE)) character(0) > try(system("convert tmp/7k5l61432671994.ps tmp/7k5l61432671994.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.412 0.415 2.863