R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(4000 + ,3600 + ,1600 + ,2500 + ,3800 + ,3500 + ,4100 + ,2000 + ,3300 + ,4000 + ,4100 + ,4200 + ,1100 + ,1900 + ,4800 + ,4000 + ,3250 + ,1200 + ,3600 + ,3400 + ,3600 + ,3300 + ,1300 + ,2500 + ,3800 + ,3800 + ,3000 + ,1600 + ,2100 + ,3900 + ,4000 + ,3900 + ,2300 + ,3600 + ,3600 + ,4200 + ,4400 + ,1900 + ,2700 + ,3600 + ,4100 + ,5250 + ,1200 + ,3000 + ,4000 + ,5200 + ,2100 + ,3400 + ,5200 + ,6900 + ,2300 + ,4100 + ,4300 + ,4500 + ,4700 + ,2200 + ,2900 + ,4400 + ,5100 + ,2300 + ,3500 + ,4100 + ,4700 + ,5400 + ,2500 + ,3500 + ,3900 + ,4100 + ,4500 + ,1800 + ,4900 + ,4500 + ,3700 + ,3100 + ,1700 + ,4000 + ,4200 + ,4300 + ,3600 + ,2600 + ,4600 + ,4000 + ,2900 + ,1800 + ,3000 + ,4200 + ,4400 + ,4900 + ,2300 + ,2400 + ,3600 + ,3900 + ,2800 + ,3800 + ,4400 + ,4200 + ,5400 + ,2300 + ,3500 + ,3800 + ,4400 + ,4400 + ,2500 + ,3700 + ,3500 + ,3300 + ,3700 + ,2200 + ,3200 + ,3100 + ,4800 + ,4400 + ,2500 + ,3100 + ,4700 + ,4300 + ,4600 + ,3100 + ,3200 + ,4300 + ,4000 + ,4500 + ,2600 + ,3600 + ,4700 + ,3800 + ,4100 + ,1700 + ,3200 + ,4000 + ,3700 + ,3600 + ,2500 + ,3800 + ,4500 + ,3500 + ,4100 + ,2300 + ,3400 + ,4800 + ,4900 + ,2600 + ,3300 + ,3900 + ,3800 + ,5000 + ,1700 + ,2700 + ,4000 + ,3300 + ,4000 + ,2500 + ,3600 + ,3800 + ,5900 + ,3600 + ,3300 + ,4000 + ,4200 + ,4300 + ,2900 + ,3900 + ,5200 + ,4000 + ,4700 + ,2200 + ,2400 + ,3700 + ,3700 + ,3000 + ,2100 + ,3500 + ,6300 + ,5200 + ,7800 + ,2700 + ,3400 + ,5000 + ,5500 + ,4500 + ,2600 + ,3900 + ,3800 + ,4400 + ,4300 + ,3300 + ,3600 + ,5300 + ,3700 + ,3800 + ,4000 + ,5200 + ,5100 + ,5100 + ,5200 + ,3800 + ,6700 + ,5200 + ,4900 + ,5700 + ,2700 + ,6300 + ,5200 + ,4500 + ,6400 + ,4000 + ,3500 + ,4700 + ,4700 + ,5000 + ,2300 + ,5200 + ,5100 + ,5400 + ,4400 + ,2600 + ,4700 + ,6100 + ,6100 + ,3500 + ,4900 + ,5500 + ,5300 + ,6300 + ,2800 + ,5900 + ,5500 + ,5200 + ,6400 + ,3100 + ,5100 + ,5400 + ,5400 + ,5100 + ,2400 + ,5500 + ,5300 + ,5000 + ,4500 + ,2000 + ,3800 + ,4900 + ,5000 + ,4000 + ,1900 + ,5200 + ,5400 + ,3200 + ,800 + ,3800 + ,4300 + ,2700) > ylimmax = '' > ylimmin = '' > main = 'Robustness of Central Tendency' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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] 3873.413 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 74.83692 > (armose <- arm / armse) [1] 51.75805 > (geo <- geomean(x)) [1] 3665.383 > (har <- harmean(x)) [1] 3413.63 > (qua <- quamean(x)) [1] 4050.811 > (win <- winmean(x)) [,1] [,2] [1,] 3871.032 73.98564 [2,] 3870.238 73.61807 [3,] 3866.667 73.09794 [4,] 3868.254 72.87115 [5,] 3872.222 71.80675 [6,] 3872.222 71.80675 [7,] 3875.000 71.46323 [8,] 3868.651 70.63432 [9,] 3868.651 70.63432 [10,] 3864.683 69.19082 [11,] 3864.683 69.19082 [12,] 3859.921 67.55716 [13,] 3849.603 66.48678 [14,] 3849.603 66.48678 [15,] 3855.556 65.80467 [16,] 3855.556 65.80467 [17,] 3855.556 64.40103 [18,] 3855.556 64.40103 [19,] 3855.556 64.40103 [20,] 3863.492 63.55615 [21,] 3863.492 63.55615 [22,] 3863.492 63.55615 [23,] 3863.492 61.75708 [24,] 3863.492 61.75708 [25,] 3863.492 61.75708 [26,] 3858.333 61.28466 [27,] 3852.976 60.80590 [28,] 3852.976 60.80590 [29,] 3852.976 60.80590 [30,] 3864.881 59.61730 [31,] 3864.881 59.61730 [32,] 3864.881 59.61730 [33,] 3877.976 58.36013 [34,] 3877.976 58.36013 [35,] 3877.976 58.36013 [36,] 3877.976 58.36013 [37,] 3877.976 58.36013 [38,] 3862.897 57.02771 [39,] 3862.897 57.02771 [40,] 3878.770 55.54370 [41,] 3878.770 55.54370 [42,] 3878.770 55.54370 [43,] 3878.770 55.54370 [44,] 3861.310 54.04572 [45,] 3879.167 52.41483 [46,] 3879.167 52.41483 [47,] 3879.167 52.41483 [48,] 3879.167 52.41483 [49,] 3859.722 50.79269 [50,] 3879.563 49.01923 [51,] 3879.563 49.01923 [52,] 3900.198 47.24305 [53,] 3900.198 47.24305 [54,] 3900.198 47.24305 [55,] 3900.198 43.60598 [56,] 3900.198 43.60598 [57,] 3900.198 43.60598 [58,] 3877.183 41.75551 [59,] 3900.595 39.83746 [60,] 3900.595 39.83746 [61,] 3900.595 39.83746 [62,] 3900.595 39.83746 [63,] 3900.595 39.83746 [64,] 3925.992 37.84917 [65,] 3925.992 37.84917 [66,] 3899.802 35.75939 [67,] 3899.802 35.75939 [68,] 3886.310 32.64448 [69,] 3900.000 31.59477 [70,] 3900.000 31.59477 [71,] 3900.000 31.59477 [72,] 3900.000 31.59477 [73,] 3900.000 31.59477 [74,] 3900.000 31.59477 [75,] 3900.000 31.59477 [76,] 3900.000 27.09040 [77,] 3900.000 27.09040 [78,] 3900.000 27.09040 [79,] 3900.000 27.09040 [80,] 3931.746 24.82024 [81,] 3931.746 24.82024 [82,] 3931.746 24.82024 [83,] 3931.746 24.82024 [84,] 3931.746 24.82024 > (tri <- trimean(x)) [,1] [,2] [1,] 3870.000 72.74094 [2,] 3868.952 71.42804 [3,] 3868.293 70.24427 [4,] 3868.852 69.19150 [5,] 3869.008 68.14755 [6,] 3868.333 67.29926 [7,] 3867.647 66.40588 [8,] 3866.525 65.52522 [9,] 3866.239 64.72895 [10,] 3865.948 63.88957 [11,] 3866.087 63.19607 [12,] 3866.228 62.46491 [13,] 3866.814 61.88073 [14,] 3868.304 61.37765 [15,] 3869.820 60.84662 [16,] 3870.909 60.35195 [17,] 3872.018 59.82936 [18,] 3873.148 59.40040 [19,] 3874.299 58.94656 [20,] 3875.472 58.46624 [21,] 3876.190 58.02553 [22,] 3876.923 57.55861 [23,] 3877.670 57.06374 [24,] 3878.431 56.67126 [25,] 3879.208 56.25447 [26,] 3880.000 55.81173 [27,] 3881.061 55.37358 [28,] 3882.398 54.93962 [29,] 3883.763 54.47776 [30,] 3885.156 53.98602 [31,] 3886.053 53.54218 [32,] 3886.968 53.06902 [33,] 3887.903 52.56437 [34,] 3888.315 52.10791 [35,] 3888.736 51.62040 [36,] 3889.167 51.09945 [37,] 3889.607 50.54244 [38,] 3890.057 49.94643 [39,] 3891.092 49.39293 [40,] 3892.151 48.79965 [41,] 3892.647 48.26012 [42,] 3893.155 47.68098 [43,] 3893.675 47.05875 [44,] 3894.207 46.38955 [45,] 3895.370 45.76582 [46,] 3895.938 45.20214 [47,] 3896.519 44.59434 [48,] 3897.115 43.93826 [49,] 3897.727 43.22915 [50,] 3899.013 42.56930 [51,] 3899.667 41.97713 [52,] 3900.338 41.33532 [53,] 3900.342 40.76065 [54,] 3900.347 40.13652 [55,] 3900.352 39.45772 [56,] 3900.357 38.96957 [57,] 3900.362 38.43748 [58,] 3900.368 37.85686 [59,] 3901.119 37.35018 [60,] 3901.136 36.92927 [61,] 3901.154 36.46772 [62,] 3901.172 35.96115 [63,] 3901.190 35.40453 [64,] 3901.210 34.79203 [65,] 3900.410 34.26555 [66,] 3899.583 33.68423 [67,] 3899.576 33.20540 [68,] 3899.569 32.67495 [69,] 3900.000 32.32443 [70,] 3900.000 32.01210 [71,] 3900.000 31.66231 [72,] 3900.000 31.27055 [73,] 3900.000 30.83154 [74,] 3900.000 30.33913 [75,] 3900.000 29.78601 [76,] 3900.000 29.16342 [77,] 3900.000 28.86448 [78,] 3900.000 28.52361 [79,] 3900.000 28.13505 [80,] 3900.000 27.69191 [81,] 3898.889 27.39157 [82,] 3897.727 27.04428 [83,] 3896.512 26.64288 [84,] 3895.238 26.17874 > (midr <- midrange(x)) [1] 4300 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 3907.037 3907.037 3907.037 3907.037 3907.037 3907.037 3907.037 3907.037 > postscript(file="/var/www/html/rcomp/tmp/12dg91243860158.ps",horizontal=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/www/html/rcomp/tmp/2kz3w1243860158.ps",horizontal=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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/www/html/rcomp/tmp/3miiu1243860158.tab") > > system("convert tmp/12dg91243860158.ps tmp/12dg91243860158.png") > system("convert tmp/2kz3w1243860158.ps tmp/2kz3w1243860158.png") > > > proc.time() user system elapsed 1.321 0.350 1.450