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(2115 + ,2180 + ,2341 + ,2402 + ,2453 + ,2466 + ,2473 + ,2507 + ,2513 + ,2523 + ,2537 + ,2544 + ,2564 + ,2582 + ,2618 + ,2622 + ,2648 + ,2679 + ,2716 + ,2772 + ,2783 + ,2811 + ,2851 + ,2856 + ,2904 + ,2932 + ,2935 + ,2985 + ,2995 + ,3003 + ,3036 + ,3127 + ,3176 + ,3228 + ,3236 + ,3238 + ,3251 + ,3252 + ,3287 + ,3318 + ,3330 + ,3362 + ,3426 + ,3458 + ,3483 + ,3518 + ,3526 + ,3597 + ,3696 + ,3708 + ,3745 + ,3760 + ,3814 + ,3824 + ,3902 + ,3915 + ,3955 + ,3996 + ,4018 + ,4029 + ,4037 + ,4115 + ,4136 + ,4160 + ,4160 + ,4202 + ,4202 + ,4233 + ,4328 + ,4375 + ,4379 + ,4394 + ,4401 + ,4427 + ,4472 + ,4491 + ,4542 + ,4614 + ,4616 + ,4635 + ,4645 + ,4648 + ,4658 + ,4684 + ,4698 + ,4703 + ,4774 + ,4799 + ,4801 + ,4839 + ,4873 + ,4916 + ,4920 + ,4946 + ,4951 + ,4952 + ,4979 + ,4980 + ,4995 + ,5011 + ,5014 + ,5019 + ,5032 + ,5137 + ,5174 + ,5181 + ,5184 + ,5221 + ,5224 + ,5225 + ,5249 + ,5252 + ,5265 + ,5266 + ,5294 + ,5294 + ,5296 + ,5335 + ,5365 + ,5373 + ,5380 + ,5396 + ,5397 + ,5398 + ,5403 + ,5436 + ,5437 + ,5456 + ,5488 + ,5531 + ,5572 + ,5582 + ,5589 + ,5596 + ,5612 + ,5612 + ,5620 + ,5625 + ,5678 + ,5706 + ,5718 + ,5724 + ,5740 + ,5764 + ,5792 + ,5813 + ,5816 + ,5821 + ,5842 + ,5844 + ,5845 + ,5866 + ,5869 + ,5869 + ,5880 + ,5881 + ,5898 + ,5898 + ,5928 + ,5968 + ,5974 + ,5983 + ,5994 + ,6011 + ,6014 + ,6028 + ,6062 + ,6063 + ,6070 + ,6082 + ,6086 + ,6105 + ,6109 + ,6112 + ,6120 + ,6145 + ,6164 + ,6175 + ,6175 + ,6187 + ,6188 + ,6198 + ,6208 + ,6210 + ,6255 + ,6268 + ,6279 + ,6303 + ,6342 + ,6355 + ,6365 + ,6369 + ,6375 + ,6404 + ,6406 + ,6424 + ,6426 + ,6462 + ,6487 + ,6496 + ,6510 + ,6513 + ,6529 + ,6537 + ,6548 + ,6554 + ,6555 + ,6575 + ,6588 + ,6591 + ,6593 + ,6596 + ,6596 + ,6598 + ,6640 + ,6645 + ,6678 + ,6719 + ,6727 + ,6778 + ,6801 + ,6810 + ,6814 + ,6897 + ,6897 + ,7128 + ,7133 + ,7203) > par1 = '12' > par1 <- '12' > #'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] 228 > (np <- floor(n / par1)) [1] 19 > 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] 19 19 19 19 19 19 19 19 19 19 19 19 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 2115 2564 2904 3251 3696 4037 4401 4698 4979 5224 5380 5589 5792 [2,] 2180 2582 2932 3252 3708 4115 4427 4703 4980 5225 5396 5596 5813 [3,] 2341 2618 2935 3287 3745 4136 4472 4774 4995 5249 5397 5612 5816 [4,] 2402 2622 2985 3318 3760 4160 4491 4799 5011 5252 5398 5612 5821 [5,] 2453 2648 2995 3330 3814 4160 4542 4801 5014 5265 5403 5620 5842 [6,] 2466 2679 3003 3362 3824 4202 4614 4839 5019 5266 5436 5625 5844 [7,] 2473 2716 3036 3426 3902 4202 4616 4873 5032 5294 5437 5678 5845 [8,] 2507 2772 3127 3458 3915 4233 4635 4916 5137 5294 5456 5706 5866 [9,] 2513 2783 3176 3483 3955 4328 4645 4920 5174 5296 5488 5718 5869 [10,] 2523 2811 3228 3518 3996 4375 4648 4946 5181 5335 5531 5724 5869 [11,] 2537 2851 3236 3526 4018 4379 4658 4951 5184 5365 5572 5740 5880 [12,] 2544 2856 3238 3597 4029 4394 4684 4952 5221 5373 5582 5764 5881 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 5898 6070 6188 6375 6548 6678 NA [2,] 5898 6082 6198 6404 6554 6719 NA [3,] 5928 6086 6208 6406 6555 6727 NA [4,] 5968 6105 6210 6424 6575 6778 NA [5,] 5974 6109 6255 6426 6588 6801 NA [6,] 5983 6112 6268 6462 6591 6810 NA [7,] 5994 6120 6279 6487 6593 6814 NA [8,] 6011 6145 6303 6496 6596 6897 NA [9,] 6014 6164 6342 6510 6596 6897 NA [10,] 6028 6175 6355 6513 6598 7128 NA [11,] 6062 6175 6365 6529 6640 7133 NA [12,] 6063 6187 6369 6537 6645 7203 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 65 18 28 1 12 78 26 5 1 1 16 7 21 [2,] 161 36 3 35 37 21 45 71 15 24 1 16 3 [3,] 61 4 50 31 15 24 19 25 16 3 1 0 5 [4,] 51 26 10 12 54 0 51 2 3 13 5 8 21 [5,] 13 31 8 32 10 42 72 38 5 1 33 5 2 [6,] 7 37 33 64 78 0 2 34 13 28 1 53 1 [7,] 34 56 91 32 13 31 19 43 105 0 19 28 21 [8,] 6 11 49 25 40 95 10 4 37 2 32 12 3 [9,] 10 28 52 35 41 47 3 26 7 39 43 6 0 [10,] 14 40 8 8 22 4 10 5 3 30 41 16 11 [11,] 7 5 2 71 11 15 26 1 37 8 10 24 1 [12,] 20 48 13 99 8 7 14 27 3 7 7 28 17 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0 12 10 29 6 41 NA [2,] 30 4 10 2 1 8 NA [3,] 40 19 2 18 20 51 NA [4,] 6 4 45 2 13 23 NA [5,] 9 3 13 36 3 9 NA [6,] 11 8 11 25 2 4 NA [7,] 17 25 24 9 3 83 NA [8,] 3 19 39 14 0 0 NA [9,] 14 11 13 3 2 231 NA [10,] 34 0 10 16 42 5 NA [11,] 1 12 4 8 5 70 NA [12,] 7 1 6 11 33 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/17t1s1425298003.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/2k9n51425298003.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/3odwt1425298003.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/4jkhl1425298003.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,] 2115.0 2180.0 2341.0 2402.0 2453.0 2466.0 2473 2507 2513.0 2523.0 2537.0 [2,] 3866.5 3911.5 3940.5 3960.0 3987.0 4013.0 4052 4074 4141.5 4185.5 4198.5 [3,] 5224.0 5225.0 5249.0 5252.0 5265.0 5266.0 5294 5294 5296.0 5335.0 5365.0 [4,] 5984.0 5990.0 6007.0 6036.5 6041.5 6047.5 6057 6078 6089.0 6101.5 6118.5 [5,] 6678.0 6719.0 6727.0 6778.0 6801.0 6810.0 6814 6897 6897.0 7128.0 7133.0 [,12] [1,] 2544.0 [2,] 4211.5 [3,] 5373.0 [4,] 6125.0 [5,] 7203.0 $n [1] 19 19 19 19 19 19 19 19 19 19 19 19 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 4456.455 4471.592 4499.942 4499.317 4520.291 4528.541 4567.234 4567.596 [2,] 5991.545 5978.408 5998.058 6004.683 6009.709 6003.459 6020.766 6020.404 [,9] [,10] [,11] [,12] [1,] 4590.076 4640.494 4669.044 4679.401 [2,] 6001.924 6029.506 6060.956 6066.599 $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(2115, 3866.5, 5224, 5984, 6678, 2180, 3911.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5xghd1425298003.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.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 1.0 1 [2,] 5.5 3.5 4.5 4.5 5.0 3.0 18.0 3.5 6.5 6.5 4.5 7 [3,] 12.0 16.0 19.0 12.0 10.0 11.0 25.0 12.0 14.0 11.0 8.0 12 [4,] 27.0 35.5 28.0 24.5 32.5 33.5 38.5 34.5 40.0 26.0 19.5 27 [5,] 41.0 71.0 61.0 54.0 72.0 78.0 56.0 49.0 52.0 42.0 37.0 48 $n [1] 19 19 19 19 19 19 19 19 19 19 19 18 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 4.206748 4.40074 10.48179 4.750463 0.03188636 -0.05554422 17.56922 [2,] 19.793252 27.59926 27.51821 19.249537 19.96811364 22.05554422 32.43078 [,8] [,9] [,10] [,11] [,12] [1,] 0.7632174 1.857025 3.931701 2.562847 4.551809 [2,] 23.2367826 26.142975 18.068299 13.437153 19.448191 $out [1] 65 78 161 91 105 83 95 231 71 70 99 $group [1] 1 1 2 7 7 7 8 9 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, 5.5, 12, 27, 41, 1, 3.5, 16, 35.5, 71, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6gfpt1425298003.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] [,10] [1,] 2180.0 2564.0 2904.0 3251.0 3696.0 4037.0 4401.0 4698.0 4979.0 5224.0 [2,] 2371.5 2620.0 2960.0 3302.5 3752.5 4148.0 4481.5 4786.5 5003.0 5250.5 [3,] 2469.5 2697.5 3019.5 3394.0 3863.0 4202.0 4615.0 4856.0 5025.5 5280.0 [4,] 2518.0 2797.0 3202.0 3500.5 3975.5 4351.5 4646.5 4933.0 5177.5 5315.5 [5,] 2544.0 2856.0 3238.0 3597.0 4029.0 4394.0 4684.0 4952.0 5221.0 5373.0 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 5380.0 5589.0 5792.0 5898.0 6070.0 6188.0 6375.0 6548 6678.0 NA [2,] 5397.5 5612.0 5818.5 5948.0 6095.5 6209.0 6415.0 6565 6752.5 NA [3,] 5436.5 5651.5 5844.5 5988.5 6116.0 6273.5 6474.5 6592 6812.0 NA [4,] 5509.5 5721.0 5869.0 6021.0 6169.5 6348.5 6511.5 6597 7012.5 NA [5,] 5582.0 5764.0 5881.0 6063.0 6187.0 6369.0 6537.0 6645 7203.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2402.68 2616.769 2909.122 3303.691 3761.288 4109.182 4539.742 4789.18 [2,] 2536.32 2778.231 3129.878 3484.309 3964.712 4294.818 4690.258 4922.82 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 4945.909 5250.353 5385.416 5601.784 5821.467 5955.204 6082.248 6209.873 [2,] 5105.091 5309.647 5487.584 5701.216 5867.533 6021.796 6149.752 6337.127 [,17] [,18] [,19] [,20] [1,] 6430.486 6577.405 6693.412 NA [2,] 6518.514 6606.595 6930.588 NA $out [1] 2115 $group [1] 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" NA Warning message: In bxp(list(stats = c(2180, 2371.5, 2469.5, 2518, 2544, 2564, 2620, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hexs1425298003.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,] 4862.474 5224.0 4925.250 [2,] 4920.474 5250.5 4986.000 [3,] 4979.526 5280.0 5042.375 [4,] 5061.921 5315.5 5129.375 [5,] 5111.526 5373.0 5168.250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4915.011 5250.353 4976.981 [2,] 5044.041 5309.647 5107.769 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(4862.47368421053, 4920.47368421053, 4979.52631578947, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/17t1s1425298003.ps tmp/17t1s1425298003.png",intern=TRUE)) character(0) > try(system("convert tmp/2k9n51425298003.ps tmp/2k9n51425298003.png",intern=TRUE)) character(0) > try(system("convert tmp/3odwt1425298003.ps tmp/3odwt1425298003.png",intern=TRUE)) character(0) > try(system("convert tmp/4jkhl1425298003.ps tmp/4jkhl1425298003.png",intern=TRUE)) character(0) > try(system("convert tmp/5xghd1425298003.ps tmp/5xghd1425298003.png",intern=TRUE)) character(0) > try(system("convert tmp/6gfpt1425298003.ps tmp/6gfpt1425298003.png",intern=TRUE)) character(0) > try(system("convert tmp/7hexs1425298003.ps tmp/7hexs1425298003.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.522 0.442 2.986