R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(-2.716932667 + ,0.695354701 + ,2.465773394 + ,3.756800929 + ,-1.889687332 + ,-1.342423946 + ,4.161807991 + ,-1.656841747 + ,-1.614396605 + ,1.160117737 + ,1.47558678 + ,0.038654809 + ,1.034583103 + ,0.869405423 + ,-0.726605178 + ,-0.007360227 + ,0.966688731 + ,3.960453337 + ,2.905813838 + ,0.813862378 + ,0.998463167 + ,1.416135174 + ,2.773099012 + ,1.361748946 + ,1.158397864 + ,1.165514867 + ,1.470598801 + ,-1.416929777 + ,0.704482544 + ,0.382605544 + ,-0.36723147 + ,-0.157794884 + ,-0.467033523 + ,0.450952519 + ,-1.151997771 + ,-2.454806771 + ,-2.290802595 + ,-1.44287535 + ,1.88743235 + ,1.949699309 + ,1.640084339 + ,-1.412909516 + ,2.502440756 + ,0.262000289 + ,-0.139025784 + ,-4.150559388 + ,-2.419095997 + ,0.218766088 + ,0.808402277 + ,-1.361515364 + ,-0.853739839 + ,0.268310726 + ,-2.61386536 + ,0.409310097 + ,-1.713731807 + ,2.167395395 + ,0.30627631 + ,0.769644429 + ,0.176995441 + ,2.206777551 + ,1.163272051 + ,0.562135982 + ,-0.29898697 + ,-0.438887734 + ,0.84995573 + ,1.256146159 + ,1.909653498 + ,3.923509508 + ,-3.808460881 + ,0.527152017 + ,-3.012245827 + ,-0.715665538 + ,1.162010456 + ,0.807171814 + ,0.990531311 + ,3.909747507 + ,-0.407232544 + ,1.787718277 + ,-1.961485328 + ,0.916861489 + ,0.463901031 + ,0.356770523 + ,-0.620182287 + ,0.313856292 + ,2.117237372 + ,0.048211388 + ,0.766905814 + ,1.318697005 + ,0.896661826 + ,-1.643303567 + ,0.167875359 + ,0.270514769 + ,0.094207665 + ,-1.836456819 + ,1.301967194 + ,0.303921953 + ,2.516715321 + ,0.169958299 + ,-0.266125863 + ,-1.194086507 + ,1.494098871 + ,2.420900716 + ,0.977353986 + ,1.161623748 + ,-1.712444774 + ,1.239562685 + ,0.227935475 + ,1.767395736 + ,-0.002480266 + ,0.82816145 + ,0.061511967 + ,2.137467172 + ,-1.528640241 + ,-2.614568461 + ,1.723547556 + ,-1.950475963 + ,1.007537805 + ,-1.785824239 + ,0.485542044 + ,-1.373030868 + ,0.592730467 + ,-2.900148395 + ,-1.073803686 + ,-0.998565253 + ,-0.921755895 + ,0.249852821 + ,1.23278974 + ,0.995768005 + ,-2.745597967 + ,2.098177534 + ,-3.490018923 + ,2.515270651 + ,-2.131895571 + ,-1.689160164 + ,-0.134952532 + ,1.120129701 + ,0.459324011 + ,-2.363957787 + ,-0.99487178 + ,-2.279773405 + ,3.129332967 + ,1.422202992 + ,-0.012629669 + ,1.782276715 + ,-3.307648252 + ,2.289181735 + ,-2.057515845 + ,1.0801914 + ,0.362236196 + ,-2.878325739 + ,-1.155043271 + ,2.007639148 + ,4.295954949 + ,1.750032454 + ,-2.310629981 + ,0.167875359 + ,1.430460681 + ,0.995768005 + ,1.32860448 + ,-0.573651755 + ,0.399396308 + ,0.533448646 + ,-0.388160789 + ,0.426210073 + ,1.327399554 + ,-1.420672833 + ,-0.469161997 + ,-3.29098658 + ,-1.848292762 + ,1.569125254 + ,1.634688184 + ,0.294051606 + ,-1.988393653 + ,-2.312033591 + ,-3.288588788 + ,0.255786884 + ,-0.263297297 + ,-0.687934672 + ,-0.062106612 + ,-1.476269705 + ,0.565951923 + ,-0.521748993 + ,1.839536729 + ,-0.520609608 + ,-6.76628809 + ,1.03190728 + ,2.252323131 + ,-0.541803289 + ,-0.526967526 + ,0.700677591 + ,-1.044903908 + ,0.145076363 + ,2.342000107 + ,1.699486741 + ,-0.915984634 + ,-0.368633528 + ,2.901656852 + ,0.687030247 + ,1.512544799 + ,1.229420219 + ,1.804610223 + ,0.434739187 + ,-2.762297678 + ,-2.916569977 + ,2.030333482 + ,0.16303558 + ,1.152973504 + ,0.56605129 + ,-2.916763144 + ,0.69684053 + ,-2.507489607 + ,-4.289684969 + ,0.690829519 + ,2.832504112 + ,1.116710656 + ,0.579212169 + ,1.937338022 + ,-0.32791694 + ,1.009711098 + ,-0.615891961 + ,-2.022491333 + ,-0.573303347 + ,0.433554087 + ,-1.45853137 + ,0.19571926 + ,-3.966868429 + ,-0.309683138 + ,0.726256447 + ,-1.343269573 + ,-1.160998557 + ,1.520067648 + ,-3.465040334 + ,4.299546178 + ,1.544133629 + ,-1.305398824 + ,-2.654920743 + ,-7.170028137 + ,-1.815214028 + ,1.407636695 + ,-1.928726129 + ,-0.407197066 + ,-1.795600382 + ,1.113655299 + ,1.72299312 + ,0.907372684 + ,-0.046770178 + ,0.846117134 + ,-2.890292844 + ,1.19903418 + ,0.116066371 + ,-1.137919803 + ,-1.862263458 + ,0.336856218 + ,2.821775236 + ,-1.715206305 + ,-0.26408786 + ,1.318811443 + ,2.176071319 + ,-1.781640984 + ,-5.483306743 + ,0.825633349 + ,-4.550209689 + ,-0.471645252 + ,0.832709147) > ylimmax = '' > ylimmin = '' > main = 'Robustness of Central Tendency' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa, P., (2012), Central Tendency (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_centraltendency.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > geomean <- function(x) { + return(exp(mean(log(x)))) + } > harmean <- function(x) { + return(1/mean(1/x)) + } > quamean <- function(x) { + return(sqrt(mean(x*x))) + } > winmean <- function(x) { + x <-sort(x[!is.na(x)]) + n<-length(x) + denom <- 3 + nodenom <- n/denom + if (nodenom>40) denom <- n/40 + sqrtn = sqrt(n) + roundnodenom = floor(nodenom) + win <- array(NA,dim=c(roundnodenom,2)) + for (j in 1:roundnodenom) { + win[j,1] <- (j*x[j+1]+sum(x[(j+1):(n-j)])+j*x[n-j])/n + win[j,2] <- sd(c(rep(x[j+1],j),x[(j+1):(n-j)],rep(x[n-j],j)))/sqrtn + } + return(win) + } > trimean <- function(x) { + x <-sort(x[!is.na(x)]) + n<-length(x) + denom <- 3 + nodenom <- n/denom + if (nodenom>40) denom <- n/40 + sqrtn = sqrt(n) + roundnodenom = floor(nodenom) + tri <- array(NA,dim=c(roundnodenom,2)) + for (j in 1:roundnodenom) { + tri[j,1] <- mean(x,trim=j/n) + tri[j,2] <- sd(x[(j+1):(n-j)]) / sqrt(n-j*2) + } + return(tri) + } > midrange <- function(x) { + return((max(x)+min(x))/2) + } > q1 <- function(data,n,p,i,f) { + np <- n*p; + i <<- floor(np) + f <<- np - i + qvalue <- (1-f)*data[i] + f*data[i+1] + } > q2 <- function(data,n,p,i,f) { + np <- (n+1)*p + i <<- floor(np) + f <<- np - i + qvalue <- (1-f)*data[i] + f*data[i+1] + } > q3 <- function(data,n,p,i,f) { + np <- n*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i] + } else { + qvalue <- data[i+1] + } + } > q4 <- function(data,n,p,i,f) { + np <- n*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- (data[i]+data[i+1])/2 + } else { + qvalue <- data[i+1] + } + } > q5 <- function(data,n,p,i,f) { + np <- (n-1)*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i+1] + } else { + qvalue <- data[i+1] + f*(data[i+2]-data[i+1]) + } + } > q6 <- function(data,n,p,i,f) { + np <- n*p+0.5 + i <<- floor(np) + f <<- np - i + qvalue <- data[i] + } > q7 <- function(data,n,p,i,f) { + np <- (n+1)*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i] + } else { + qvalue <- f*data[i] + (1-f)*data[i+1] + } + } > q8 <- function(data,n,p,i,f) { + np <- (n+1)*p + i <<- floor(np) + f <<- np - i + if (f==0) { + qvalue <- data[i] + } else { + if (f == 0.5) { + qvalue <- (data[i]+data[i+1])/2 + } else { + if (f < 0.5) { + qvalue <- data[i] + } else { + qvalue <- data[i+1] + } + } + } + } > midmean <- function(x,def) { + x <-sort(x[!is.na(x)]) + n<-length(x) + if (def==1) { + qvalue1 <- q1(x,n,0.25,i,f) + qvalue3 <- q1(x,n,0.75,i,f) + } + if (def==2) { + qvalue1 <- q2(x,n,0.25,i,f) + qvalue3 <- q2(x,n,0.75,i,f) + } + if (def==3) { + qvalue1 <- q3(x,n,0.25,i,f) + qvalue3 <- q3(x,n,0.75,i,f) + } + if (def==4) { + qvalue1 <- q4(x,n,0.25,i,f) + qvalue3 <- q4(x,n,0.75,i,f) + } + if (def==5) { + qvalue1 <- q5(x,n,0.25,i,f) + qvalue3 <- q5(x,n,0.75,i,f) + } + if (def==6) { + qvalue1 <- q6(x,n,0.25,i,f) + qvalue3 <- q6(x,n,0.75,i,f) + } + if (def==7) { + qvalue1 <- q7(x,n,0.25,i,f) + qvalue3 <- q7(x,n,0.75,i,f) + } + if (def==8) { + qvalue1 <- q8(x,n,0.25,i,f) + qvalue3 <- q8(x,n,0.75,i,f) + } + midm <- 0 + myn <- 0 + roundno4 <- round(n/4) + round3no4 <- round(3*n/4) + for (i in 1:n) { + if ((x[i]>=qvalue1) & (x[i]<=qvalue3)){ + midm = midm + x[i] + myn = myn + 1 + } + } + midm = midm / myn + return(midm) + } > (arm <- mean(x)) [1] 1.136364e-11 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.1144268 > (armose <- arm / armse) [1] 9.93093e-11 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -0.5388881 > (qua <- quamean(x)) [1] 1.85569 > (win <- winmean(x)) [,1] [,2] [1,] 0.001515715 0.11407012 [2,] 0.010219006 0.11192060 [3,] 0.018534261 0.10977307 [4,] 0.021921850 0.10908780 [5,] 0.024296160 0.10866189 [6,] 0.024994896 0.10759690 [7,] 0.012557688 0.10497179 [8,] 0.015434137 0.10293470 [9,] 0.016143965 0.10280962 [10,] 0.019486364 0.10177784 [11,] 0.019733564 0.10164478 [12,] 0.017629999 0.10140101 [13,] 0.018612842 0.09849919 [14,] 0.023599706 0.09790646 [15,] 0.022881710 0.09783481 [16,] 0.021654693 0.09750829 [17,] 0.019399802 0.09716253 [18,] 0.014836154 0.09657034 [19,] 0.019385337 0.09528486 [20,] 0.017858148 0.09489314 [21,] 0.016515398 0.09431913 [22,] 0.019124206 0.09352834 [23,] 0.021883889 0.09308168 [24,] 0.019227059 0.09283755 [25,] 0.027384820 0.09159811 [26,] 0.030696176 0.09089280 [27,] 0.027409818 0.08992009 [28,] 0.030850835 0.08911538 [29,] 0.030190026 0.08800299 [30,] 0.028944835 0.08787060 [31,] 0.028022217 0.08736794 [32,] 0.026665616 0.08701332 [33,] 0.039163392 0.08469521 [34,] 0.044244489 0.08340714 [35,] 0.046648428 0.08278464 [36,] 0.050556080 0.08228529 [37,] 0.052241731 0.08176444 [38,] 0.051327152 0.08141736 [39,] 0.050627654 0.08080836 [40,] 0.056458617 0.08025359 [41,] 0.057067016 0.07957456 [42,] 0.049839245 0.07863644 [43,] 0.050888150 0.07839218 [44,] 0.043501460 0.07723804 [45,] 0.042584759 0.07661388 [46,] 0.040094863 0.07614734 [47,] 0.039500314 0.07598060 [48,] 0.048225541 0.07464046 [49,] 0.045063261 0.07436366 [50,] 0.044362324 0.07427270 [51,] 0.041106533 0.07330609 [52,] 0.045845767 0.07261946 [53,] 0.047345499 0.07228972 [54,] 0.051519961 0.07164028 [55,] 0.059825922 0.06938759 [56,] 0.063904180 0.06792550 [57,] 0.067473893 0.06757756 [58,] 0.069026691 0.06714902 [59,] 0.073963042 0.06672350 [60,] 0.071011507 0.06638212 [61,] 0.061352995 0.06556273 [62,] 0.066823831 0.06449527 [63,] 0.067955578 0.06415056 [64,] 0.071561947 0.06372004 [65,] 0.064288739 0.06318856 [66,] 0.065165191 0.06183714 [67,] 0.092845709 0.05944479 [68,] 0.101043406 0.05872349 [69,] 0.102498830 0.05858944 [70,] 0.102907028 0.05849611 [71,] 0.106230606 0.05815590 [72,] 0.122237449 0.05664054 [73,] 0.121146867 0.05537408 [74,] 0.133177363 0.05427322 [75,] 0.133358646 0.05413026 [76,] 0.144773612 0.05180986 [77,] 0.133154476 0.05077217 [78,] 0.150754400 0.04928340 [79,] 0.182156445 0.04592319 [80,] 0.184812914 0.04562896 [81,] 0.190536984 0.04480165 [82,] 0.210744151 0.04318955 [83,] 0.212093004 0.04309094 [84,] 0.223866849 0.04199928 [85,] 0.219736326 0.04169738 [86,] 0.226523421 0.04071813 [87,] 0.214992138 0.03924102 [88,] 0.213568714 0.03890118 > (tri <- trimean(x)) [,1] [,2] [1,] 0.01095604 0.11077880 [2,] 0.02054160 0.10726947 [3,] 0.02582292 0.10474046 [4,] 0.02832840 0.10288361 [5,] 0.02999309 0.10112597 [6,] 0.03118674 0.09937538 [7,] 0.03227650 0.09774798 [8,] 0.03527521 0.09650013 [9,] 0.03793682 0.09550746 [10,] 0.04055673 0.09448193 [11,] 0.04285531 0.09353829 [12,] 0.04516749 0.09256204 [13,] 0.04771297 0.09156225 [14,] 0.05021702 0.09081781 [15,] 0.05236201 0.09009353 [16,] 0.05459844 0.08933751 [17,] 0.05696180 0.08857053 [18,] 0.05952020 0.08779204 [19,] 0.06242005 0.08702036 [20,] 0.06508950 0.08631134 [21,] 0.06789785 0.08559335 [22,] 0.07083399 0.08487862 [23,] 0.07368040 0.08418255 [24,] 0.07643287 0.08347940 [25,] 0.07937336 0.08275246 [26,] 0.08196297 0.08207085 [27,] 0.08444181 0.08139762 [28,] 0.08712280 0.08074875 [29,] 0.08969835 0.08011405 [30,] 0.09235390 0.07951209 [31,] 0.09511627 0.07888095 [32,] 0.09797318 0.07824185 [33,] 0.10094433 0.07758427 [34,] 0.10346600 0.07702950 [35,] 0.10583630 0.07651663 [36,] 0.10816154 0.07600685 [37,] 0.11038490 0.07549272 [38,] 0.11259160 0.07497435 [39,] 0.11487992 0.07444044 [40,] 0.11724371 0.07390479 [41,] 0.11944801 0.07336475 [42,] 0.12167952 0.07282582 [43,] 0.12421642 0.07230077 [44,] 0.12677438 0.07175164 [45,] 0.12964586 0.07122663 [46,] 0.13261539 0.07069760 [47,] 0.13573884 0.07015435 [48,] 0.13895655 0.06957876 [49,] 0.14196269 0.06903840 [50,] 0.14514605 0.06847049 [51,] 0.14843085 0.06786251 [52,] 0.15190311 0.06726160 [53,] 0.15531099 0.06665389 [54,] 0.15875836 0.06601629 [55,] 0.16216276 0.06536627 [56,] 0.16539445 0.06479958 [57,] 0.16858414 0.06427203 [58,] 0.17174833 0.06371967 [59,] 0.17495080 0.06314441 [60,] 0.17808884 0.06254516 [61,] 0.18140673 0.06191151 [62,] 0.18511799 0.06126711 [63,] 0.18876802 0.06063274 [64,] 0.19249053 0.05996069 [65,] 0.19621315 0.05925405 [66,] 0.20027236 0.05851038 [67,] 0.20442951 0.05778539 [68,] 0.20786445 0.05716439 [69,] 0.21115586 0.05653222 [70,] 0.21450853 0.05584391 [71,] 0.21795851 0.05508983 [72,] 0.22142050 0.05428216 [73,] 0.22450246 0.05350950 [74,] 0.22772469 0.05274725 [75,] 0.23068350 0.05199067 [76,] 0.23374228 0.05115915 [77,] 0.23655182 0.05042375 [78,] 0.23983427 0.04967781 [79,] 0.24267862 0.04897396 [80,] 0.24462334 0.04847034 [81,] 0.24655839 0.04792523 [82,] 0.24838427 0.04737871 [83,] 0.24962083 0.04690035 [84,] 0.25086422 0.04636313 [85,] 0.25176687 0.04584896 [86,] 0.25284821 0.04528599 [87,] 0.25374611 0.04473303 [88,] 0.25508245 0.04423235 > (midr <- midrange(x)) [1] -1.435241 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 0.1886731 0.2002724 0.1886731 0.2002724 0.2002724 0.1886731 0.2002724 [8] 0.1962131 > postscript(file="/var/wessaorg/rcomp/tmp/1xnk51356031996.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > lb <- win[,1] - 2*win[,2] > ub <- win[,1] + 2*win[,2] > if ((ylimmin == '') | (ylimmax == '')) plot(win[,1],type='b',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(win[,1],type='l',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(ylimmin,ylimmax)) > lines(ub,lty=3) > lines(lb,lty=3) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2yobw1356031996.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > lb <- tri[,1] - 2*tri[,2] > ub <- tri[,1] + 2*tri[,2] > if ((ylimmin == '') | (ylimmax == '')) plot(tri[,1],type='b',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(tri[,1],type='l',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(ylimmin,ylimmax)) > lines(ub,lty=3) > lines(lb,lty=3) > grid() > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Central Tendency - Ungrouped Data',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Measure',header=TRUE) > a<-table.element(a,'Value',header=TRUE) > a<-table.element(a,'S.E.',header=TRUE) > a<-table.element(a,'Value/S.E.',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm', 'Arithmetic Mean', 'click to view the definition of the Arithmetic Mean'),header=TRUE) > a<-table.element(a,arm) > a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean_standard_error.htm', armse, 'click to view the definition of the Standard Error of the Arithmetic Mean')) > a<-table.element(a,armose) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/geometric_mean.htm', 'Geometric Mean', 'click to view the definition of the Geometric Mean'),header=TRUE) > a<-table.element(a,geo) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/harmonic_mean.htm', 'Harmonic Mean', 'click to view the definition of the Harmonic Mean'),header=TRUE) > a<-table.element(a,har) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/quadratic_mean.htm', 'Quadratic Mean', 'click to view the definition of the Quadratic Mean'),header=TRUE) > a<-table.element(a,qua) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > for (j in 1:length(win[,1])) { + a<-table.row.start(a) + mylabel <- paste('Winsorized Mean (',j) + mylabel <- paste(mylabel,'/') + mylabel <- paste(mylabel,length(win[,1])) + mylabel <- paste(mylabel,')') + a<-table.element(a,hyperlink('http://www.xycoon.com/winsorized_mean.htm', mylabel, 'click to view the definition of the Winsorized Mean'),header=TRUE) + a<-table.element(a,win[j,1]) + a<-table.element(a,win[j,2]) + a<-table.element(a,win[j,1]/win[j,2]) + a<-table.row.end(a) + } > for (j in 1:length(tri[,1])) { + a<-table.row.start(a) + mylabel <- paste('Trimmed Mean (',j) + mylabel <- paste(mylabel,'/') + mylabel <- paste(mylabel,length(tri[,1])) + mylabel <- paste(mylabel,')') + a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm', mylabel, 'click to view the definition of the Trimmed Mean'),header=TRUE) + a<-table.element(a,tri[j,1]) + a<-table.element(a,tri[j,2]) + a<-table.element(a,tri[j,1]/tri[j,2]) + a<-table.row.end(a) + } > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/median_1.htm', 'Median', 'click to view the definition of the Median'),header=TRUE) > a<-table.element(a,median(x)) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/midrange.htm', 'Midrange', 'click to view the definition of the Midrange'),header=TRUE) > a<-table.element(a,midr) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_1.htm','Weighted Average at Xnp',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[1]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_2.htm','Weighted Average at X(n+1)p',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[2]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_3.htm','Empirical Distribution Function',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[3]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_4.htm','Empirical Distribution Function - Averaging',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[4]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_5.htm','Empirical Distribution Function - Interpolation',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[5]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_6.htm','Closest Observation',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[6]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_7.htm','True Basic - Statistics Graphics Toolkit',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[7]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') > mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_8.htm','MS Excel (old versions)',''),sep=' - ') > a<-table.element(a,mylabel,header=TRUE) > a<-table.element(a,midm[8]) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Number of observations',header=TRUE) > a<-table.element(a,length(x)) > a<-table.element(a,'') > a<-table.element(a,'') > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3rvf41356031996.tab") > > try(system("convert tmp/1xnk51356031996.ps tmp/1xnk51356031996.png",intern=TRUE)) character(0) > try(system("convert tmp/2yobw1356031996.ps tmp/2yobw1356031996.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.632 0.360 2.966