R version 2.5.1 (2007-06-27) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(467037,460070,447988,442867,436087,431328,484015,509673,512927,502831,470984,471067,476049,474605,470439,461251,454724,455626,516847,525192,522975,518585,509239,512238,519164,517009,509933,509127,500857,506971,569323,579714,577992,565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565742,557274) > par1 = '72' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Mean Plot (v1.0.1) 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 > #Technical description: Write here your technical program description > par1 <- as.numeric(par1) > (n <- length(x)) [1] 72 > (np <- floor(n / par1)) [1] 1 > arr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + if (j == par1) j = 0 + } > ari [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > arr [,1] [,2] [1,] 467037 NA [2,] 460070 NA [3,] 447988 NA [4,] 442867 NA [5,] 436087 NA [6,] 431328 NA [7,] 484015 NA [8,] 509673 NA [9,] 512927 NA [10,] 502831 NA [11,] 470984 NA [12,] 471067 NA [13,] 476049 NA [14,] 474605 NA [15,] 470439 NA [16,] 461251 NA [17,] 454724 NA [18,] 455626 NA [19,] 516847 NA [20,] 525192 NA [21,] 522975 NA [22,] 518585 NA [23,] 509239 NA [24,] 512238 NA [25,] 519164 NA [26,] 517009 NA [27,] 509933 NA [28,] 509127 NA [29,] 500857 NA [30,] 506971 NA [31,] 569323 NA [32,] 579714 NA [33,] 577992 NA [34,] 565464 NA [35,] 547344 NA [36,] 554788 NA [37,] 562325 NA [38,] 560854 NA [39,] 555332 NA [40,] 543599 NA [41,] 536662 NA [42,] 542722 NA [43,] 593530 NA [44,] 610763 NA [45,] 612613 NA [46,] 611324 NA [47,] 594167 NA [48,] 595454 NA [49,] 590865 NA [50,] 589379 NA [51,] 584428 NA [52,] 573100 NA [53,] 567456 NA [54,] 569028 NA [55,] 620735 NA [56,] 628884 NA [57,] 628232 NA [58,] 612117 NA [59,] 595404 NA [60,] 597141 NA [61,] 593408 NA [62,] 590072 NA [63,] 579799 NA [64,] 574205 NA [65,] 572775 NA [66,] 572942 NA [67,] 619567 NA [68,] 625809 NA [69,] 619916 NA [70,] 587625 NA [71,] 565742 NA [72,] 557274 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/www/html/rcomp/tmp/1ncy31193583408.ps",horizontal=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/www/html/rcomp/tmp/2rb491193583408.ps",horizontal=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/www/html/rcomp/tmp/3lcwm1193583408.ps",horizontal=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/www/html/rcomp/tmp/488d11193583409.ps",horizontal=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] [1,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [2,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [3,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [4,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [5,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [2,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [3,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [4,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [5,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [1,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [2,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [3,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [4,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [5,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [,39] [,40] [1,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [2,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [3,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [4,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [5,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [2,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [3,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [4,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [5,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [1,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [2,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [3,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [4,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [5,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [,61] [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [2,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [3,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [4,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [5,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [,71] [,72] [1,] 565742 557274 [2,] 565742 557274 [3,] 565742 557274 [4,] 565742 557274 [5,] 565742 557274 $n [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [2,] 467037 460070 447988 442867 436087 431328 484015 509673 512927 502831 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [2,] 470984 471067 476049 474605 470439 461251 454724 455626 516847 525192 [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [1,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [2,] 522975 518585 509239 512238 519164 517009 509933 509127 500857 506971 [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [,39] [,40] [1,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [2,] 569323 579714 577992 565464 547344 554788 562325 560854 555332 543599 [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [2,] 536662 542722 593530 610763 612613 611324 594167 595454 590865 589379 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [1,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [2,] 584428 573100 567456 569028 620735 628884 628232 612117 595404 597141 [,61] [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [1,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [2,] 593408 590072 579799 574205 572775 572942 619567 625809 619916 587625 [,71] [,72] [1,] 565742 557274 [2,] 565742 557274 $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" "33" "34" "35" "36" "37" "38" "39" "40" "41" "42" "43" "44" "45" [46] "46" "47" "48" "49" "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "60" [61] "61" "62" "63" "64" "65" "66" "67" "68" "69" "70" "71" "72" > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/547541193583409.ps",horizontal=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] [1,] 431328.0 NA [2,] 508049.0 NA [3,] 556303.0 NA [4,] 589725.5 NA [5,] 628884.0 NA $n [1] 72 0 $conf [,1] [,2] [1,] 541094.4 NA [2,] 571511.6 NA $out numeric(0) $group numeric(0) $names [1] "1" NA > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/664zh1193583409.ps",horizontal=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,] 431328.0 431328.0 431328.0 [2,] 508049.0 508049.0 508049.0 [3,] 556303.0 556303.0 556303.0 [4,] 589725.5 589725.5 589725.5 [5,] 628884.0 628884.0 628884.0 $n [1] 72 72 72 $conf [,1] [,2] [,3] [1,] 541094.4 541094.4 541094.4 [2,] 571511.6 571511.6 571511.6 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > system("convert tmp/1ncy31193583408.ps tmp/1ncy31193583408.png") > system("convert tmp/2rb491193583408.ps tmp/2rb491193583408.png") > system("convert tmp/3lcwm1193583408.ps tmp/3lcwm1193583408.png") > system("convert tmp/488d11193583409.ps tmp/488d11193583409.png") > system("convert tmp/547541193583409.ps tmp/547541193583409.png") > system("convert tmp/664zh1193583409.ps tmp/664zh1193583409.png") > > > proc.time() user system elapsed 1.671 0.981 1.900