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(95320.00 + ,94965.00 + ,94605.00 + ,93860.00 + ,101230.00 + ,100840.00 + ,95320.00 + ,91650.00 + ,92005.00 + ,92005.00 + ,92400.00 + ,93110.00 + ,94215.00 + ,94215.00 + ,93505.00 + ,91650.00 + ,101230.00 + ,102690.00 + ,100485.00 + ,95320.00 + ,97530.00 + ,94215.00 + ,95710.00 + ,96425.00 + ,97170.00 + ,95320.00 + ,95710.00 + ,93110.00 + ,101230.00 + ,103795.00 + ,101590.00 + ,97530.00 + ,101945.00 + ,97170.00 + ,101590.00 + ,101230.00 + ,102335.00 + ,98275.00 + ,102690.00 + ,102335.00 + ,108960.00 + ,107465.00 + ,101590.00 + ,98630.00 + ,102690.00 + ,97170.00 + ,101230.00 + ,101945.00 + ,103440.00 + ,100130.00 + ,101945.00 + ,103050.00 + ,107110.00 + ,103795.00 + ,99380.00 + ,94605.00 + ,99025.00 + ,86875.00 + ,92755.00 + ,96065.00 + ,99380.00 + ,94605.00 + ,94605.00 + ,94605.00 + ,97170.00 + ,93505.00 + ,88695.00 + ,84670.00 + ,87590.00 + ,76190.00 + ,83175.00 + ,87235.00 + ,87980.00 + ,83920.00 + ,84275.00 + ,83175.00 + ,86875.00 + ,84275.00 + ,79150.00 + ,75445.00 + ,81710.00 + ,68105.00 + ,76940.00 + ,80965.00 + ,80965.00 + ,76190.00 + ,71775.00 + ,71420.00 + ,75445.00 + ,71775.00 + ,64795.00 + ,59985.00 + ,65150.00 + ,53005.00 + ,64045.00 + ,69920.00 + ,71775.00 + ,67715.00 + ,62585.00 + ,66255.00 + ,67715.00 + ,66610.00 + ,55565.00 + ,50440.00 + ,54105.00 + ,43065.00 + ,54465.00 + ,58525.00 + ,61835.00 + ,56315.00 + ,51150.00 + ,54105.00 + ,55565.00 + ,52645.00 + ,41605.00 + ,36795.00 + ,41210.00 + ,29065.00 + ,42315.00 + ,50440.00) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 95320 94215 97170 102335 103440 99380 87980 80965 71775 61835 NA [2,] 94965 94215 95320 98275 100130 94605 83920 76190 67715 56315 NA [3,] 94605 93505 95710 102690 101945 94605 84275 71775 62585 51150 NA [4,] 93860 91650 93110 102335 103050 94605 83175 71420 66255 54105 NA [5,] 101230 101230 101230 108960 107110 97170 86875 75445 67715 55565 NA [6,] 100840 102690 103795 107465 103795 93505 84275 71775 66610 52645 NA [7,] 95320 100485 101590 101590 99380 88695 79150 64795 55565 41605 NA [8,] 91650 95320 97530 98630 94605 84670 75445 59985 50440 36795 NA [9,] 92005 97530 101945 102690 99025 87590 81710 65150 54105 41210 NA [10,] 92005 94215 97170 97170 86875 76190 68105 53005 43065 29065 NA [11,] 92400 95710 101590 101230 92755 83175 76940 64045 54465 42315 NA [12,] 93110 96425 101230 101945 96065 87235 80965 69920 58525 50440 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -355 0 -1850 -4060 -3310 -4775 -4060 -4775 -4060 -5520 NA [2,] -360 -710 390 4415 1815 0 355 -4415 -5130 -5165 NA [3,] -745 -1855 -2600 -355 1105 0 -1100 -355 3670 2955 NA [4,] 7370 9580 8120 6625 4060 2565 3700 4025 1460 1460 NA [5,] -390 1460 2565 -1495 -3315 -3665 -2600 -3670 -1105 -2920 NA [6,] -5520 -2205 -2205 -5875 -4415 -4810 -5125 -6980 -11045 -11040 NA [7,] -3670 -5165 -4060 -2960 -4775 -4025 -3705 -4810 -5125 -4810 NA [8,] 355 2210 4415 4060 4420 2920 6265 5165 3665 4415 NA [9,] 0 -3315 -4775 -5520 -12150 -11400 -13605 -12145 -11040 -12145 NA [10,] 395 1495 4420 4060 5880 6985 8835 11040 11400 13250 NA [11,] 710 715 -360 715 3310 4060 4025 5875 4060 8125 NA [12,] 1105 745 1105 1495 3315 745 0 1855 3310 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/1t4uu1439742123.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/2pa1b1439742123.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/3aane1439742123.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/42h3t1439742123.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,] 61835.0 56315 51150 54105 55565 52645.0 41605.0 36795 41210.0 [2,] 80965.0 76190 71775 71420 75445 71775.0 64795.0 59985 65150.0 [3,] 94767.5 94410 94055 92380 99200 97172.5 92007.5 88160 89797.5 [4,] 99380.0 95320 95710 94605 101230 103795.0 100485.0 95320 99025.0 [5,] 103440.0 100130 102690 103050 108960 107465.0 101590.0 98630 102690.0 [,10] [,11] [,12] [1,] 29065.0 42315.0 50440.0 [2,] 53005.0 64045.0 69920.0 [3,] 81532.5 87787.5 90172.5 [4,] 94215.0 95710.0 96425.0 [5,] 97170.0 101590.0 101945.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 85566.63 84851.89 82096.12 80795.85 86316.79 81174.03 74175.35 [2,] 103968.37 103968.11 106013.88 103964.15 112083.21 113170.97 109839.65 [,8] [,9] [,10] [,11] [,12] [1,] 70505.23 72872.2 60942.34 71966.4 76929.55 [2,] 105814.77 106722.8 102122.66 103608.6 103415.45 $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(61835, 80965, 94767.5, 99380, 103440, 56315, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5z0281439742123.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] [1,] -5520 -5165 -2600 1460.0 -3670.0 -6980.0 -5165.0 2210.0 -13605 395.0 [2,] -4775 -4415 -1100 2565.0 -3315.0 -6980.0 -4810.0 2920.0 -12145 4060.0 [3,] -4060 -180 -355 4042.5 -2047.5 -5322.5 -4417.5 4237.5 -11220 6432.5 [4,] -1850 390 1105 7370.0 -390.0 -4415.0 -3705.0 4420.0 -4775 11040.0 [5,] 0 4415 3670 9580.0 2565.0 -2205.0 -2960.0 6265.0 0 13250.0 [,11] [,12] [1,] -360.0 0 [2,] 715.0 745 [3,] 3667.5 1105 [4,] 4060.0 1855 [5,] 8125.0 3315 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -5521.447 -2580.77 -1456.7059 1641.73 -3508.9466 -6604.076 -4969.602 [2,] -2598.553 2220.77 746.7059 6443.27 -586.0534 -4040.924 -3865.398 [,8] [,9] [,10] [,11] [,12] [1,] 3488.04 -14902.346 2945.014 1996.205 520.4 [2,] 4986.96 -7537.654 9919.986 5338.795 1689.6 $out [1] -11045 -11040 355 $group [1] 6 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-5520, -4775, -4060, -1850, 0, -5165, -4415, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6c0cw1439742123.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] [,9] [1,] 91650.0 91650.0 93110 97170 86875 76190.0 75445.0 53005 43065.0 [2,] 92202.5 94215.0 96440 99930 95335 85952.5 78045.0 64420 54285.0 [3,] 94232.5 95515.0 99380 102140 99755 91100.0 82442.5 70670 60555.0 [4,] 95320.0 99007.5 101590 102690 103245 94605.0 84275.0 73610 67162.5 [5,] 95320.0 102690.0 103795 102690 107110 99380.0 87980.0 80965 71775.0 [,10] [,11] [1,] 29065.0 NA [2,] 41407.5 NA [3,] 50795.0 NA [4,] 54835.0 NA [5,] 61835.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 92810.59 93329.11 97031.05 100881.1 96147.2 87153.54 79600.96 66478.38 [2,] 95654.41 97700.89 101728.95 103398.9 103362.8 95046.46 85284.04 74861.62 [,9] [,10] [,11] [1,] 54681.49 44670.63 NA [2,] 66428.51 56919.37 NA $out [1] 101230 100840 108960 107465 68105 $group [1] 1 1 4 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(91650, 92202.5, 94232.5, 95320, 95320, 91650, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7upnb1439742123.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,] 73686.50 81532.50 75221.25 [2,] 81379.25 88978.75 82545.31 [3,] 84435.25 92193.75 84448.44 [4,] 87452.25 94588.75 87943.12 [5,] 90253.00 99200.00 90773.12 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 81665.31 89634.99 81986.46 [2,] 87205.19 94752.51 86910.42 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(73686.5, 81379.25, 84435.25, 87452.25, 90253, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1t4uu1439742123.ps tmp/1t4uu1439742123.png",intern=TRUE)) character(0) > try(system("convert tmp/2pa1b1439742123.ps tmp/2pa1b1439742123.png",intern=TRUE)) character(0) > try(system("convert tmp/3aane1439742123.ps tmp/3aane1439742123.png",intern=TRUE)) character(0) > try(system("convert tmp/42h3t1439742123.ps tmp/42h3t1439742123.png",intern=TRUE)) character(0) > try(system("convert tmp/5z0281439742123.ps tmp/5z0281439742123.png",intern=TRUE)) character(0) > try(system("convert tmp/6c0cw1439742123.ps tmp/6c0cw1439742123.png",intern=TRUE)) character(0) > try(system("convert tmp/7upnb1439742123.ps tmp/7upnb1439742123.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.679 0.438 3.144