R version 2.6.0 (2007-10-03) 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. Natural language support but running in an English locale 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(513,503,471,471,476,475,470,461,455,456,517,525,523,519,509,512,519,517,510,509,501,507,569,580,578,565,547,555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626,620,588,566,557,561,549,532,526,511,499,555,565,542) > 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] 73 > (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] 2 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,] 513 542 [2,] 503 NA [3,] 471 NA [4,] 471 NA [5,] 476 NA [6,] 475 NA [7,] 470 NA [8,] 461 NA [9,] 455 NA [10,] 456 NA [11,] 517 NA [12,] 525 NA [13,] 523 NA [14,] 519 NA [15,] 509 NA [16,] 512 NA [17,] 519 NA [18,] 517 NA [19,] 510 NA [20,] 509 NA [21,] 501 NA [22,] 507 NA [23,] 569 NA [24,] 580 NA [25,] 578 NA [26,] 565 NA [27,] 547 NA [28,] 555 NA [29,] 562 NA [30,] 561 NA [31,] 555 NA [32,] 544 NA [33,] 537 NA [34,] 543 NA [35,] 594 NA [36,] 611 NA [37,] 613 NA [38,] 611 NA [39,] 594 NA [40,] 595 NA [41,] 591 NA [42,] 589 NA [43,] 584 NA [44,] 573 NA [45,] 567 NA [46,] 569 NA [47,] 621 NA [48,] 629 NA [49,] 628 NA [50,] 612 NA [51,] 595 NA [52,] 597 NA [53,] 593 NA [54,] 590 NA [55,] 580 NA [56,] 574 NA [57,] 573 NA [58,] 573 NA [59,] 620 NA [60,] 626 NA [61,] 620 NA [62,] 588 NA [63,] 566 NA [64,] 557 NA [65,] 561 NA [66,] 549 NA [67,] 532 NA [68,] 526 NA [69,] 511 NA [70,] 499 NA [71,] 555 NA [72,] 565 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/1m0qo1193572220.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/2dvsq1193572220.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/3y9jv1193572220.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/46a3x1193572220.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] [,11] [,12] [,13] [1,] 513.0 503 471 471 476 475 470 461 455 456 517 525 523 [2,] 513.0 503 471 471 476 475 470 461 455 456 517 525 523 [3,] 527.5 503 471 471 476 475 470 461 455 456 517 525 523 [4,] 542.0 503 471 471 476 475 470 461 455 456 517 525 523 [5,] 542.0 503 471 471 476 475 470 461 455 456 517 525 523 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 519 509 512 519 517 510 509 501 507 569 580 578 [2,] 519 509 512 519 517 510 509 501 507 569 580 578 [3,] 519 509 512 519 517 510 509 501 507 569 580 578 [4,] 519 509 512 519 517 510 509 501 507 569 580 578 [5,] 519 509 512 519 517 510 509 501 507 569 580 578 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 565 547 555 562 561 555 544 537 543 594 611 613 [2,] 565 547 555 562 561 555 544 537 543 594 611 613 [3,] 565 547 555 562 561 555 544 537 543 594 611 613 [4,] 565 547 555 562 561 555 544 537 543 594 611 613 [5,] 565 547 555 562 561 555 544 537 543 594 611 613 [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 611 594 595 591 589 584 573 567 569 621 629 628 [2,] 611 594 595 591 589 584 573 567 569 621 629 628 [3,] 611 594 595 591 589 584 573 567 569 621 629 628 [4,] 611 594 595 591 589 584 573 567 569 621 629 628 [5,] 611 594 595 591 589 584 573 567 569 621 629 628 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [1,] 612 595 597 593 590 580 574 573 573 620 626 620 [2,] 612 595 597 593 590 580 574 573 573 620 626 620 [3,] 612 595 597 593 590 580 574 573 573 620 626 620 [4,] 612 595 597 593 590 580 574 573 573 620 626 620 [5,] 612 595 597 593 590 580 574 573 573 620 626 620 [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [1,] 588 566 557 561 549 532 526 511 499 555 565 [2,] 588 566 557 561 549 532 526 511 499 555 565 [3,] 588 566 557 561 549 532 526 511 499 555 565 [4,] 588 566 557 561 549 532 526 511 499 555 565 [5,] 588 566 557 561 549 532 526 511 499 555 565 $n [1] 2 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] [,11] [,12] [,13] [1,] 495.1004 503 471 471 476 475 470 461 455 456 517 525 523 [2,] 559.8996 503 471 471 476 475 470 461 455 456 517 525 523 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [1,] 519 509 512 519 517 510 509 501 507 569 580 578 [2,] 519 509 512 519 517 510 509 501 507 569 580 578 [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [1,] 565 547 555 562 561 555 544 537 543 594 611 613 [2,] 565 547 555 562 561 555 544 537 543 594 611 613 [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [1,] 611 594 595 591 589 584 573 567 569 621 629 628 [2,] 611 594 595 591 589 584 573 567 569 621 629 628 [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [1,] 612 595 597 593 590 580 574 573 573 620 626 620 [2,] 612 595 597 593 590 580 574 573 573 620 626 620 [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [1,] 588 566 557 561 549 532 526 511 499 555 565 [2,] 588 566 557 561 549 532 526 511 499 555 565 $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" Warning message: In bxp(list(stats = c(513, 513, 527.5, 542, 542, 503, 503, 503, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/51l351193572220.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,] 455.0 542 [2,] 515.0 542 [3,] 561.0 542 [4,] 589.5 542 [5,] 629.0 542 $n [1] 72 1 $conf [,1] [,2] [1,] 547.1277 542 [2,] 574.8723 542 $out numeric(0) $group numeric(0) $names [1] "1" NA > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6r8vj1193572220.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,] 455.0 455.0 455.0 [2,] 517.0 517.0 517.0 [3,] 561.0 561.0 561.0 [4,] 589.5 589.5 589.5 [5,] 629.0 629.0 629.0 $n [1] 72 72 72 $conf [,1] [,2] [,3] [1,] 547.5002 547.5002 547.5002 [2,] 574.4998 574.4998 574.4998 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > system("convert tmp/1m0qo1193572220.ps tmp/1m0qo1193572220.png") > system("convert tmp/2dvsq1193572220.ps tmp/2dvsq1193572220.png") > system("convert tmp/3y9jv1193572220.ps tmp/3y9jv1193572220.png") > system("convert tmp/46a3x1193572220.ps tmp/46a3x1193572220.png") > system("convert tmp/51l351193572220.ps tmp/51l351193572220.png") > system("convert tmp/6r8vj1193572220.ps tmp/6r8vj1193572220.png") > > > proc.time() user system elapsed 2.981 1.621 3.194