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. 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(122302.01 + ,109264.65 + ,103674.75 + ,103890.3 + ,75512.66 + ,83121.3 + ,125096.81 + ,74206.73 + ,88481.63 + ,111598.17 + ,146919.48 + ,150790.85 + ,113780.5 + ,110870.76 + ,118785.32 + ,112820.5 + ,102188.92 + ,97092.73 + ,114067.82 + ,89690.15 + ,89267.9 + ,96198.64 + ,129599.75 + ,169424.7 + ,152510.91 + ,121850.2 + ,144737.64 + ,121381.88 + ,106894.86 + ,94305.06 + ,116800.42 + ,77584.28 + ,100680.88 + ,106634.05 + ,168390.77 + ,211971.89 + ,136163.28 + ,168950.25 + ,89816.88 + ,85406.93 + ,66055.52 + ,73311.68 + ,85674.51 + ,82822.59 + ,94277.63 + ,100991.65 + ,149245.88 + ,208517.17 + ,40733.51 + ,121352.23 + ,104020.11 + ,99566.82 + ,101352.17 + ,106628.41 + ,109696.95 + ,248696.37 + ,105628.33 + ,120449.17 + ,136547.7 + ,140896.42 + ,131509.91 + ,95450.31 + ,133592.64 + ,110332.9 + ,88110.54 + ,64931.25 + ,98446.22 + ,84212.38 + ,77519.55 + ,124806.02 + ,102185.94 + ,151348.79 + ,124378.28 + ,101433.13 + ,126724.22 + ,87461.88 + ,95288.27 + ,129055.33 + ,107753.06 + ,96364.03 + ,71662.75 + ,125666.24 + ,456841.51 + ,167642.32 + ,167154.73 + ,139685.18 + ,119275.2 + ,122746.05 + ,107337.43 + ,112584.89 + ,133183.08 + ,121152.57 + ,119815.6 + ,122858.44 + ,152077.17 + ,157221.96 + ,140435.08 + ,101455.09 + ,104791.29 + ,77226.59 + ,84477.43 + ,66227.74 + ,89076.23 + ,108924.43 + ,83926.11 + ,91764.8 + ,120892.76 + ,129952.42 + ,135865.14 + ,105512.77 + ,96486.62 + ,78064.88 + ,92370.22 + ,98454.46 + ,96703.93 + ,83170.95) > par1 = '12' > #'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] 116 > (np <- floor(n / par1)) [1] 9 > 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] 10 10 10 10 10 10 10 10 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 122302.01 113780.50 152510.91 136163.28 40733.51 131509.91 124378.28 [2,] 109264.65 110870.76 121850.20 168950.25 121352.23 95450.31 101433.13 [3,] 103674.75 118785.32 144737.64 89816.88 104020.11 133592.64 126724.22 [4,] 103890.30 112820.50 121381.88 85406.93 99566.82 110332.90 87461.88 [5,] 75512.66 102188.92 106894.86 66055.52 101352.17 88110.54 95288.27 [6,] 83121.30 97092.73 94305.06 73311.68 106628.41 64931.25 129055.33 [7,] 125096.81 114067.82 116800.42 85674.51 109696.95 98446.22 107753.06 [8,] 74206.73 89690.15 77584.28 82822.59 248696.37 84212.38 96364.03 [9,] 88481.63 89267.90 100680.88 94277.63 105628.33 77519.55 71662.75 [10,] 111598.17 96198.64 106634.05 100991.65 120449.17 124806.02 125666.24 [11,] 146919.48 129599.75 168390.77 149245.88 136547.70 102185.94 456841.51 [12,] 150790.85 169424.70 211971.89 208517.17 140896.42 151348.79 167642.32 [,8] [,9] [,10] [1,] 167154.7 140435.08 135865.14 [2,] 139685.2 101455.09 105512.77 [3,] 119275.2 104791.29 96486.62 [4,] 122746.1 77226.59 78064.88 [5,] 107337.4 84477.43 92370.22 [6,] 112584.9 66227.74 98454.46 [7,] 133183.1 89076.23 96703.93 [8,] 121152.6 108924.43 83170.95 [9,] 119815.6 83926.11 NA [10,] 122858.4 91764.80 NA [11,] 152077.2 120892.76 NA [12,] 157222.0 129952.42 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/1i5l31196673490.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/2u79d1196673490.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/3zwau1196673490.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/41g4p1196673490.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] [1,] 113780.5 95450.31 89816.88 77226.59 66055.52 64931.25 85674.51 [2,] 122302.0 101455.09 103674.75 85406.93 84477.43 73311.68 96703.93 [3,] 133687.5 110067.70 111788.30 101728.56 93829.24 95698.89 108725.01 [4,] 140435.1 121850.20 126724.22 112820.50 102188.92 106628.41 116800.42 [5,] 167154.7 139685.18 144737.64 122746.05 107337.43 129055.33 133183.08 [,8] [,9] [,10] [,11] [,12] [1,] 74206.73 71662.75 91764.8 102185.9 129952.4 [2,] 82822.59 83926.11 100991.6 129599.8 150790.9 [3,] 86951.26 89267.90 111598.2 146919.5 157222.0 [4,] 108924.43 100680.88 122858.4 152077.2 169424.7 [5,] 121152.57 119815.60 125666.2 168390.8 169424.7 $n [1] 10 10 10 10 10 10 10 10 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 124627.5 99877.5 100271.9 88031.65 84979.88 79052.53 98684.0 73909.75 [2,] 142747.5 120257.9 123304.7 115425.47 102678.61 112345.26 118766.0 99992.78 [,9] [,10] [,11] [,12] [1,] 80443.72 100081.7 135081.4 147408.1 [2,] 98092.08 123114.7 158757.6 167035.8 $out [1] 40733.51 168950.25 248696.37 456841.51 211971.89 208517.17 $group [1] 1 2 8 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(113780.5, 122302.01, 133687.525, 140435.08, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5qv3u1196673490.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] [1,] 74206.73 89267.90 77584.28 66055.52 99566.82 64931.25 71662.75 [2,] 85801.46 96645.68 103657.46 84114.76 102686.14 86161.46 95826.15 [3,] 106577.48 111845.63 119091.15 92047.26 108162.68 100316.08 116065.67 [4,] 123699.41 116426.57 148624.28 142704.58 128949.96 128157.96 127889.77 [5,] 150790.85 129599.75 211971.89 208517.17 140896.42 151348.79 167642.32 [,8] [,9] [,10] [1,] 107337.4 66227.74 78064.88 [2,] 119545.4 84201.77 87770.58 [3,] 122802.2 96609.95 96595.27 [4,] 145881.2 114908.60 101983.62 [5,] 167154.7 140435.08 105512.77 $n [1] 12 12 12 12 12 12 12 12 12 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 89291.97 102823.4 98581.49 65324.04 96183.57 81161.2 101441.2 [2,] 123862.98 120867.8 139600.81 118770.47 120141.79 119471.0 130690.1 [,8] [,9] [,10] [1,] 110790.3 82604.36 88655.67 [2,] 134814.2 110615.53 104534.88 $out [1] 169424.70 40733.51 248696.37 456841.51 135865.14 $group [1] 2 5 5 7 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(74206.73, 85801.465, 106577.475, 123699.41, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6kx5k1196673490.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,] 91958.80 86951.26 90174.50 [2,] 96230.58 94764.07 94014.86 [3,] 109434.24 109396.35 109276.72 [4,] 122032.90 122737.92 122702.82 [5,] 126483.34 157221.96 160107.78 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 97665.63 96637.3 96191.95 [2,] 121202.85 122155.4 122361.48 $out [1] 173633.4 165307.4 $group [1] 1 1 $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > system("convert tmp/1i5l31196673490.ps tmp/1i5l31196673490.png") > system("convert tmp/2u79d1196673490.ps tmp/2u79d1196673490.png") > system("convert tmp/3zwau1196673490.ps tmp/3zwau1196673490.png") > system("convert tmp/41g4p1196673490.ps tmp/41g4p1196673490.png") > system("convert tmp/5qv3u1196673490.ps tmp/5qv3u1196673490.png") > system("convert tmp/6kx5k1196673490.ps tmp/6kx5k1196673490.png") > > > proc.time() user system elapsed 1.329 0.823 1.830