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(3167956.00 + ,3001753.00 + ,3571343.00 + ,3990145.00 + ,4472259.00 + ,4487988.00 + ,5021544.00 + ,4877589.00 + ,4563348.00 + ,4452338.00 + ,3535989.00 + ,3454304.00 + ,3331523.00 + ,3213977.00 + ,3896807.00 + ,4121803.00 + ,4566599.00 + ,4529566.00 + ,5172312.00 + ,5121598.00 + ,4713449.00 + ,4656638.00 + ,3647578.00 + ,3545823.00 + ,3388686.00 + ,3348700.00 + ,3973721.00 + ,4156519.00 + ,4713826.00 + ,4704148.00 + ,5175950.00 + ,5025767.00 + ,4600637.00 + ,4560314.00 + ,3443549.00 + ,3333873.00 + ,3072606.00 + ,2891262.00 + ,3390581.00 + ,3888685.00 + ,4173577.00 + ,4130139.00 + ,4851476.00 + ,4811406.00 + ,4322719.00 + ,4274814.00 + ,3355439.00 + ,3293039.00 + ,3114971.00 + ,3049444.00 + ,3697355.00 + ,3213665.00 + ,4447089.00 + ,4442139.00 + ,5119203.00 + ,5058056.00 + ,4623783.00 + ,4666071.00 + ,3719403.00 + ,3440349.00 + ,3466587.00 + ,3251624.00 + ,3921482.00 + ,4466794.00 + ,4916693.00 + ,4939490.00 + ,5627276.00 + ,5540569.00 + ,5128892.00 + ,5024163.00 + ,3807138.00 + ,3777434.00 + ,3675761.00 + ,3552136.00 + ,4177498.00 + ,4568847.00 + ,5027940.00 + ,5078079.00 + ,5759003.00 + ,5671424.00 + ,5239374.00 + ,5100023.00 + ,3944666.00 + ,3858569.00 + ,3670053.00 + ,3563751.00 + ,4341934.00 + ,4779391.00 + ,5440427.00 + ,5404974.00 + ,5934128.00 + ,5942981.00 + ,5477811.00 + ,5288928.00 + ,4099344.00 + ,4103791.00) > par1 = '32' > par1 <- '32' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > (n <- length(x)) [1] 96 > (np <- floor(n / par1)) [1] 3 > 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] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 > arr [,1] [,2] [,3] [,4] [1,] 3167956 4600637 4916693 NA [2,] 3001753 4560314 4939490 NA [3,] 3571343 3443549 5627276 NA [4,] 3990145 3333873 5540569 NA [5,] 4472259 3072606 5128892 NA [6,] 4487988 2891262 5024163 NA [7,] 5021544 3390581 3807138 NA [8,] 4877589 3888685 3777434 NA [9,] 4563348 4173577 3675761 NA [10,] 4452338 4130139 3552136 NA [11,] 3535989 4851476 4177498 NA [12,] 3454304 4811406 4568847 NA [13,] 3331523 4322719 5027940 NA [14,] 3213977 4274814 5078079 NA [15,] 3896807 3355439 5759003 NA [16,] 4121803 3293039 5671424 NA [17,] 4566599 3114971 5239374 NA [18,] 4529566 3049444 5100023 NA [19,] 5172312 3697355 3944666 NA [20,] 5121598 3213665 3858569 NA [21,] 4713449 4447089 3670053 NA [22,] 4656638 4442139 3563751 NA [23,] 3647578 5119203 4341934 NA [24,] 3545823 5058056 4779391 NA [25,] 3388686 4623783 5440427 NA [26,] 3348700 4666071 5404974 NA [27,] 3973721 3719403 5934128 NA [28,] 4156519 3440349 5942981 NA [29,] 4713826 3466587 5477811 NA [30,] 4704148 3251624 5288928 NA [31,] 5175950 3921482 4099344 NA [32,] 5025767 4466794 4103791 NA > darr [,1] [,2] [,3] [,4] [1,] -166203 -40323 22797 NA [2,] 569590 -1116765 687786 NA [3,] 418802 -109676 -86707 NA [4,] 482114 -261267 -411677 NA [5,] 15729 -181344 -104729 NA [6,] 533556 499319 -1217025 NA [7,] -143955 498104 -29704 NA [8,] -314241 284892 -101673 NA [9,] -111010 -43438 -123625 NA [10,] -916349 721337 625362 NA [11,] -81685 -40070 391349 NA [12,] -122781 -488687 459093 NA [13,] -117546 -47905 50139 NA [14,] 682830 -919375 680924 NA [15,] 224996 -62400 -87579 NA [16,] 444796 -178068 -432050 NA [17,] -37033 -65527 -139351 NA [18,] 642746 647911 -1155357 NA [19,] -50714 -483690 -86097 NA [20,] -408149 1233424 -188516 NA [21,] -56811 -4950 -106302 NA [22,] -1009060 677064 778183 NA [23,] -101755 -61147 437457 NA [24,] -157137 -434273 661036 NA [25,] -39986 42288 -35453 NA [26,] 625021 -946668 529154 NA [27,] 182798 -279054 8853 NA [28,] 557307 26238 -465170 NA [29,] -9678 -214963 -188883 NA [30,] 471802 669858 -1189584 NA [31,] -150183 545312 4447 NA [32,] -425130 449899 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/1i5691424963904.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/2t7fj1424963904.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/3ell31424963904.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/4dq0t1424963904.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,] 3167956 3001753 3443549 3333873 3072606 2891262 3390581 3777434 3675761 [2,] 3884296 3781034 3507446 3662009 3772432 3689625 3598860 3833060 3924669 [3,] 4600637 4560314 3571343 3990145 4472259 4487988 3807138 3888685 4173577 [4,] 4758665 4749902 4599310 4765357 4800576 4756076 4414341 4383137 4368462 [5,] 4916693 4939490 5627276 5540569 5128892 5024163 5021544 4877589 4563348 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 3552136 3535989 3454304 3331523 3213977 3355439 3293039 3114971 3049444 [2,] 3841138 3856744 4011576 3827121 3744396 3626123 3707421 3840785 3789505 [3,] 4130139 4177498 4568847 4322719 4274814 3896807 4121803 4566599 4529566 [4,] 4291238 4514487 4690126 4675330 4676446 4827905 4896614 4902986 4814794 [5,] 4452338 4851476 4811406 5027940 5078079 5759003 5671424 5239374 5100023 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] 3697355 3213665 3670053 3563751 3647578 3545823 3388686 3348700 3719403 [2,] 3821010 3536117 4058571 4002945 3994756 4162607 4006234 4007386 3846562 [3,] 3944666 3858569 4447089 4442139 4341934 4779391 4623783 4666071 3973721 [4,] 4558489 4490084 4580269 4549388 4730568 4918724 5032105 5035522 4953924 [5,] 5172312 5121598 4713449 4656638 5119203 5058056 5440427 5404974 5934128 [,28] [,29] [,30] [,31] [,32] [1,] 3440349 3466587 3251624 3921482 4103791 [2,] 3798434 4090206 3977886 4010413 4285292 [3,] 4156519 4713826 4704148 4099344 4466794 [4,] 5049750 5095818 4996538 4637647 4746280 [5,] 5942981 5477811 5288928 5175950 5025767 $n [1] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3803026 3676499 2575330 2983656 3534373 3515158 3063245 3386897 3768743 [2,] 5398248 5444129 4567356 4996634 5410145 5460818 4551031 4390473 4578411 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [1,] 3719551 3577496 3949864 3548972 3424585 2800525 3037006 3597645 3594283 [2,] 4540727 4777500 5187830 5096466 5125043 4993089 5206600 5535553 5464849 [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [1,] 3271928 2988348 3971189 3943666 3670716 4089651 3687970 3728191 2963570 [2,] 4617404 4728790 4922989 4940612 5013152 5469131 5559596 5603951 4983872 [,28] [,29] [,30] [,31] [,32] [1,] 3015052 3796493 3774920 3527173 4046275 [2,] 5297986 5631159 5633376 4671515 4887313 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" [31] "31" "32" Warning message: In bxp(list(stats = c(3167956, 3884296.5, 4600637, 4758665, 4916693, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5fd3i1424963904.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] [1,] -166203 -1116765.0 -109676.0 -411677.0 -181344.0 -1217025.0 -143955.0 [2,] -103263 -273587.5 -98191.5 -336472.0 -143036.5 -358853.0 -86829.5 [3,] -40323 569590.0 -86707.0 -261267.0 -104729.0 499319.0 -29704.0 [4,] -8763 628688.0 166047.5 110423.5 -44500.0 516437.5 234200.0 [5,] 22797 687786.0 418802.0 482114.0 15729.0 533556.0 498104.0 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -314241.0 -123625.0 -916349.0 -81685.0 -488687 -117546.0 -919375.0 [2,] -207957.0 -117317.5 -145493.5 -60877.5 -305734 -82725.5 -119225.5 [3,] -101673.0 -111010.0 625362.0 -40070.0 -122781 -47905.0 680924.0 [4,] 91609.5 -77224.0 673349.5 175639.5 168156 1117.0 681877.0 [5,] 284892.0 -43438.0 721337.0 391349.0 459093 50139.0 682830.0 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -87579.0 -432050 -139351 -1155357.0 -483690.0 -408149.0 -106302.0 [2,] -74989.5 -305059 -102439 -256305.5 -284893.5 -298332.5 -81556.5 [3,] -62400.0 -178068 -65527 642746.0 -86097.0 -188516.0 -56811.0 [4,] 81298.0 133364 -51280 645328.5 -68405.5 522454.0 -30880.5 [5,] 224996.0 444796 -37033 647911.0 -50714.0 1233424.0 -4950.0 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -1009060.0 -101755 -434273.0 -39986.0 -946668.0 -279054.0 -465170.0 [2,] -165998.0 -81451 -295705.0 -37719.5 -208757.0 -135100.5 -219466.0 [3,] 677064.0 -61147 -157137.0 -35453.0 529154.0 8853.0 26238.0 [4,] 727623.5 188155 251949.5 3417.5 577087.5 95825.5 291772.5 [5,] 778183.0 437457 661036.0 42288.0 625021.0 182798.0 557307.0 [,29] [,30] [,31] [,32] [1,] -214963.0 -1189584 -150183.0 -425130.0 [2,] -201923.0 -358891 -72868.0 -425130.0 [3,] -188883.0 471802 4447.0 12384.5 [4,] -99280.5 570830 274879.5 449899.0 [5,] -9678.0 669858 545312.0 449899.0 $n [1] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -126527.17 -253477.8 -327749.4 -668931.1 -194615.32 -299132.7 -322551.4 [2,] 45881.17 1392657.8 154335.4 146397.1 -14842.68 1297770.7 263143.4 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -374941.6 -147583.83 -121597.6 -255824 -555069.8 -124387.25 -49852.46 [2,] 171595.6 -74436.17 1372321.6 175684 309507.8 28577.25 1411700.46 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] -204967.56 -578003.3 -112194.93 -179736.6 -283580.3 -937248.5 -103038.33 [2,] 80167.56 221867.3 -18859.07 1465228.6 111386.3 560216.5 -10583.67 [,22] [,23] [,24] [,25] [,26] [,27] [,28] [1,] -138109.5 -307085.2 -656714.8 -72978.724 -187703.9 -201800.8 -440120.6 [2,] 1492237.5 184791.2 342440.8 2072.724 1246011.9 219506.8 492596.6 [,29] [,30] [,31] [,32] [1,] -282514.87 -376302 -312772.9 -965223 [2,] -95251.13 1319906 321666.9 989992 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" [31] "31" "32" Warning message: In bxp(list(stats = c(-166203, -103263, -40323, -8763, 22797, -1116765, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/69p2j1424963904.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] [1,] 3001753 2891262 3552136 NA [2,] 3540906 3344656 4022005 NA [3,] 4304428 3905084 4981826 NA [4,] 4708798 4513554 5422700 NA [5,] 5175950 5119203 5942981 NA $n [1] 32 32 32 0 $conf [,1] [,2] [,3] [,4] [1,] 3978228 3578602 4590602 NA [2,] 4630629 4231565 5373051 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" NA > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/734wu1424963904.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,] 4044871 3571343 4006600 [2,] 4188639 4044744 4200085 [3,] 4274154 4332326 4294261 [4,] 4406913 4563456 4386064 [5,] 4552741 4779391 4593012 $n [1] 32 32 32 $conf [,1] [,2] [,3] [1,] 4213189 4187447 4242315 [2,] 4335119 4477206 4346206 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1i5691424963904.ps tmp/1i5691424963904.png",intern=TRUE)) character(0) > try(system("convert tmp/2t7fj1424963904.ps tmp/2t7fj1424963904.png",intern=TRUE)) character(0) > try(system("convert tmp/3ell31424963904.ps tmp/3ell31424963904.png",intern=TRUE)) character(0) > try(system("convert tmp/4dq0t1424963904.ps tmp/4dq0t1424963904.png",intern=TRUE)) character(0) > try(system("convert tmp/5fd3i1424963904.ps tmp/5fd3i1424963904.png",intern=TRUE)) character(0) > try(system("convert tmp/69p2j1424963904.ps tmp/69p2j1424963904.png",intern=TRUE)) character(0) > try(system("convert tmp/734wu1424963904.ps tmp/734wu1424963904.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.688 0.459 3.172