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(140,132,117,114,113,110,107,103,98,98,137,148,147,139,130,128,127,123,118,114,108,111,151,159,158,148,138,137,136,133,126,120,114,116,153,162,161,149,139,135,130,127,122,117,112,113,149,157,157,147,137,132,125,123,117,114,111,112,144,150,149,134,123,116,117,111,105,102,95,93,124,130,124) > par1 = '73' > #'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] 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 1 > arr [,1] [,2] [1,] 140 NA [2,] 132 NA [3,] 117 NA [4,] 114 NA [5,] 113 NA [6,] 110 NA [7,] 107 NA [8,] 103 NA [9,] 98 NA [10,] 98 NA [11,] 137 NA [12,] 148 NA [13,] 147 NA [14,] 139 NA [15,] 130 NA [16,] 128 NA [17,] 127 NA [18,] 123 NA [19,] 118 NA [20,] 114 NA [21,] 108 NA [22,] 111 NA [23,] 151 NA [24,] 159 NA [25,] 158 NA [26,] 148 NA [27,] 138 NA [28,] 137 NA [29,] 136 NA [30,] 133 NA [31,] 126 NA [32,] 120 NA [33,] 114 NA [34,] 116 NA [35,] 153 NA [36,] 162 NA [37,] 161 NA [38,] 149 NA [39,] 139 NA [40,] 135 NA [41,] 130 NA [42,] 127 NA [43,] 122 NA [44,] 117 NA [45,] 112 NA [46,] 113 NA [47,] 149 NA [48,] 157 NA [49,] 157 NA [50,] 147 NA [51,] 137 NA [52,] 132 NA [53,] 125 NA [54,] 123 NA [55,] 117 NA [56,] 114 NA [57,] 111 NA [58,] 112 NA [59,] 144 NA [60,] 150 NA [61,] 149 NA [62,] 134 NA [63,] 123 NA [64,] 116 NA [65,] 117 NA [66,] 111 NA [67,] 105 NA [68,] 102 NA [69,] 95 NA [70,] 93 NA [71,] 124 NA [72,] 130 NA [73,] 124 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/1mytt1193407527.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/2otfa1193407527.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/3le7a1193407527.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/4uumx1193407527.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] [,14] [1,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [2,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [3,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [4,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [5,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [1,] 130 128 127 123 118 114 108 111 151 159 158 148 [2,] 130 128 127 123 118 114 108 111 151 159 158 148 [3,] 130 128 127 123 118 114 108 111 151 159 158 148 [4,] 130 128 127 123 118 114 108 111 151 159 158 148 [5,] 130 128 127 123 118 114 108 111 151 159 158 148 [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [1,] 138 137 136 133 126 120 114 116 153 162 161 149 [2,] 138 137 136 133 126 120 114 116 153 162 161 149 [3,] 138 137 136 133 126 120 114 116 153 162 161 149 [4,] 138 137 136 133 126 120 114 116 153 162 161 149 [5,] 138 137 136 133 126 120 114 116 153 162 161 149 [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 139 135 130 127 122 117 112 113 149 157 157 147 [2,] 139 135 130 127 122 117 112 113 149 157 157 147 [3,] 139 135 130 127 122 117 112 113 149 157 157 147 [4,] 139 135 130 127 122 117 112 113 149 157 157 147 [5,] 139 135 130 127 122 117 112 113 149 157 157 147 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 137 132 125 123 117 114 111 112 144 150 149 134 [2,] 137 132 125 123 117 114 111 112 144 150 149 134 [3,] 137 132 125 123 117 114 111 112 144 150 149 134 [4,] 137 132 125 123 117 114 111 112 144 150 149 134 [5,] 137 132 125 123 117 114 111 112 144 150 149 134 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [,73] [1,] 123 116 117 111 105 102 95 93 124 130 124 [2,] 123 116 117 111 105 102 95 93 124 130 124 [3,] 123 116 117 111 105 102 95 93 124 130 124 [4,] 123 116 117 111 105 102 95 93 124 130 124 [5,] 123 116 117 111 105 102 95 93 124 130 124 $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 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [2,] 140 132 117 114 113 110 107 103 98 98 137 148 147 139 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [1,] 130 128 127 123 118 114 108 111 151 159 158 148 [2,] 130 128 127 123 118 114 108 111 151 159 158 148 [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [1,] 138 137 136 133 126 120 114 116 153 162 161 149 [2,] 138 137 136 133 126 120 114 116 153 162 161 149 [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 139 135 130 127 122 117 112 113 149 157 157 147 [2,] 139 135 130 127 122 117 112 113 149 157 157 147 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 137 132 125 123 117 114 111 112 144 150 149 134 [2,] 137 132 125 123 117 114 111 112 144 150 149 134 [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [,73] [1,] 123 116 117 111 105 102 95 93 124 130 124 [2,] 123 116 117 111 105 102 95 93 124 130 124 $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" "73" > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5hsl51193407527.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,] 93 NA [2,] 114 NA [3,] 126 NA [4,] 139 NA [5,] 162 NA $n [1] 73 0 $conf [,1] [,2] [1,] 121.3769 NA [2,] 130.6231 NA $out numeric(0) $group numeric(0) $names [1] "1" NA > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6r5b61193407527.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,] 93 93 93 [2,] 114 114 114 [3,] 126 126 126 [4,] 139 139 139 [5,] 162 162 162 $n [1] 73 73 73 $conf [,1] [,2] [,3] [1,] 121.3769 121.3769 121.3769 [2,] 130.6231 130.6231 130.6231 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > system("convert tmp/1mytt1193407527.ps tmp/1mytt1193407527.png") > system("convert tmp/2otfa1193407527.ps tmp/2otfa1193407527.png") > system("convert tmp/3le7a1193407527.ps tmp/3le7a1193407527.png") > system("convert tmp/4uumx1193407527.ps tmp/4uumx1193407527.png") > system("convert tmp/5hsl51193407527.ps tmp/5hsl51193407527.png") > system("convert tmp/6r5b61193407527.ps tmp/6r5b61193407527.png") > > > proc.time() user system elapsed 1.702 0.994 1.928