R version 2.7.2 (2008-08-25) Copyright (C) 2008 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(11008.9,9996.6,9419.5,11958.8,12594.6,11890.6,10871.7,11835.7,11542.2,13093.7,11180.2,12035.7,12112,10875.2,9897.3,11672.1,12385.7,11405.6,9830.9,11025.1,10853.8,12252.6,11839.4,11669.1,11601.4,11178.4,9516.4,12102.8,12989,11610.2,10205.5,11356.2,11307.1,12648.6,11947.2,11714.1,12192.5,11268.8,9097.4,12639.8,13040.1,11687.3,11191.7,11391.9,11793.1,13933.2,12778.1,11810.3,13698.4,11956.6,10723.8,13938.9,13979.8,13807.4,12973.9,12509.8,12934.1,14908.3,13772.1,13012.6,14049.9,11816.5,11593.2,14466.2,13615.9,14733.9,13880.7,13527.5,13584,16170.2,13260.6,14741.9,15486.5,13154.5,12621.2,15031.6,15452.4,15428,13105.9,14716.8,14180,16202.2,14392.4,15140.6,15960.1,14351.3,13230.2,15202.1,17157.3,16159.1,13405.7,17224.7,17338.4,17370.6,18817.8,16593.2,17979.5) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = '12' > ylab = '' > xlab = '' > main = '' > #'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] 97 > (np <- floor(n / par1)) [1] 8 > 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] 9 8 8 8 8 8 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 11008.9 12112.0 11601.4 12192.5 13698.4 14049.9 15486.5 15960.1 17979.5 [2,] 9996.6 10875.2 11178.4 11268.8 11956.6 11816.5 13154.5 14351.3 NA [3,] 9419.5 9897.3 9516.4 9097.4 10723.8 11593.2 12621.2 13230.2 NA [4,] 11958.8 11672.1 12102.8 12639.8 13938.9 14466.2 15031.6 15202.1 NA [5,] 12594.6 12385.7 12989.0 13040.1 13979.8 13615.9 15452.4 17157.3 NA [6,] 11890.6 11405.6 11610.2 11687.3 13807.4 14733.9 15428.0 16159.1 NA [7,] 10871.7 9830.9 10205.5 11191.7 12973.9 13880.7 13105.9 13405.7 NA [8,] 11835.7 11025.1 11356.2 11391.9 12509.8 13527.5 14716.8 17224.7 NA [9,] 11542.2 10853.8 11307.1 11793.1 12934.1 13584.0 14180.0 17338.4 NA [10,] 13093.7 12252.6 12648.6 13933.2 14908.3 16170.2 16202.2 17370.6 NA [11,] 11180.2 11839.4 11947.2 12778.1 13772.1 13260.6 14392.4 18817.8 NA [12,] 12035.7 11669.1 11714.1 11810.3 13012.6 14741.9 15140.6 16593.2 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/1vlw51225750175.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/2zsno1225750175.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/3cstz1225750175.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/46ofx1225750175.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] [1,] 11008.9 9996.60 9097.40 11672.10 12385.7 11405.60 9830.9 11025.10 [2,] 12112.0 11026.80 9467.95 12030.80 12791.8 11648.75 10538.6 11374.05 [3,] 13698.4 11542.65 10310.55 13289.35 13328.0 12849.00 12082.8 12172.75 [4,] 15486.5 12555.55 12107.20 14748.90 14716.1 15080.95 13255.8 14122.15 [5,] 17979.5 14351.30 13230.20 15202.10 17157.3 16159.10 13880.7 17224.70 [,9] [,10] [,11] [,12] [1,] 10853.80 12252.60 11180.20 11669.10 [2,] 11424.65 12871.15 11893.30 11762.20 [3,] 12363.60 14420.75 13019.35 12524.15 [4,] 13882.00 16186.20 14082.25 14941.25 [5,] 17338.40 17370.60 14392.40 16593.20 $n [1] 9 8 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 11921.16 10688.67 8836.227 11770.98 12253.06 10931.72 10564.93 10637.62 [2,] 15475.64 12396.63 11784.873 14807.72 14402.94 14766.28 13600.67 13707.88 [,9] [,10] [,11] [,12] [1,] 10990.89 12568.92 11796.57 10748.29 [2,] 13736.31 16272.58 14242.13 14300.01 $out [1] 18817.8 $group [1] 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(11008.9, 12112, 13698.4, 15486.5, 17979.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5fw2q1225750175.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] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 9419.50 9830.90 10205.50 11191.70 11956.60 11593.20 12621.20 13230.20 [2,] 10940.30 10864.50 11242.75 11330.35 12721.95 13394.05 13667.25 14776.70 [3,] 11688.95 11537.35 11605.80 11801.70 13355.50 13748.30 14874.20 16376.15 [4,] 11997.25 11975.70 12025.00 12708.95 13873.15 14600.05 15440.20 17281.55 [5,] 13093.70 12385.70 12989.00 13933.20 14908.30 16170.20 16202.20 18817.80 [,9] [1,] 17979.5 [2,] 17979.5 [3,] 17979.5 [4,] 17979.5 [5,] 17979.5 $n [1] 12 12 12 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 11206.87 11030.52 11249.01 11172.91 12830.43 13198.24 14065.55 15233.67 [2,] 12171.03 12044.18 11962.59 12430.49 13880.57 14298.36 15682.85 17518.63 [,9] [1,] 17979.5 [2,] 17979.5 $out [1] 9516.4 9097.4 10723.8 $group [1] 3 4 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(9419.5, 10940.3, 11688.95, 11997.25, 13093.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6h3wa1225750175.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,] 10762.38 11542.65 10671.19 [2,] 12437.42 12127.77 12273.45 [3,] 13339.98 12686.58 13105.72 [4,] 13643.08 13308.67 13478.17 [5,] 14572.42 14420.75 14580.31 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 12790.06 12147.96 12556.24 [2,] 13889.89 13225.19 13655.20 $out [1] 10310.55 $group [1] 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(10762.375, 12437.41875, 13339.975, 13643.0819444444, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1vlw51225750175.ps tmp/1vlw51225750175.png") > system("convert tmp/2zsno1225750175.ps tmp/2zsno1225750175.png") > system("convert tmp/3cstz1225750175.ps tmp/3cstz1225750175.png") > system("convert tmp/46ofx1225750175.ps tmp/46ofx1225750175.png") > system("convert tmp/5fw2q1225750175.ps tmp/5fw2q1225750175.png") > system("convert tmp/6h3wa1225750175.ps tmp/6h3wa1225750175.png") > > > proc.time() user system elapsed 1.258 0.808 1.512