R version 2.8.0 (2008-10-20) 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(510401 + ,508642 + ,501805 + ,495476 + ,490336 + ,490042 + ,553155 + ,569999 + ,573170 + ,571687 + ,575453 + ,580177 + ,579849 + ,574346 + ,563325 + ,555604 + ,545544 + ,545109 + ,605181 + ,627856 + ,631421 + ,625671 + ,613577 + ,606463 + ,601676 + ,589121 + ,573559 + ,558487 + ,552148 + ,545720 + ,606569 + ,636067 + ,630704 + ,623275 + ,617771 + ,605401 + ,619393 + ,596019 + ,569977 + ,546213 + ,528492 + ,505944 + ,554910 + ,567831 + ,564021 + ,552800 + ,541102 + ,542378 + ,540380 + ,521219 + ,504652 + ,490626 + ,481686 + ,477930 + ,522605 + ,531432 + ,532355 + ,539954 + ,524987 + ,533307 + ,530541 + ,508392 + ,495208 + ,482223 + ,470495 + ,466106 + ,515037 + ,517752 + ,515565 + ,510727 + ,499725 + ,498369 + ,493756 + ,476141 + ,458458 + ,443182 + ,429597 + ,424476 + ,476257 + ,480555 + ,469762 + ,459820 + ,451028 + ,450065 + ,444385 + ,428846 + ,421020 + ,399778 + ,389005 + ,384018 + ,431933 + ,445844 + ,431464 + ,423263 + ,415881 + ,416208 + ,413491 + ,399153 + ,385939 + ,373917 + ,364635 + ,364696 + ,418358 + ,428212 + ,423730 + ,420677 + ,417428 + ,423245 + ,423113 + ,418873 + ,405733 + ,397812 + ,389918 + ,391116 + ,443814 + ,460373 + ,455422 + ,456288 + ,452233 + ,459256 + ,461146 + ,451391 + ,443101 + ,438810 + ,430457 + ,435721 + ,488280 + ,505814 + ,502338 + ,500910 + ,501434 + ,515476 + ,520862 + ,519517 + ,511805 + ,508607 + ,505327 + ,511435 + ,570158 + ,591665 + ,593572 + ,586346 + ,586063 + ,591504 + ,594033 + ,585597 + ,572450 + ,562917 + ,554675 + ,553997 + ,601310 + ,622255 + ,616735 + ,606480 + ,595079 + ,598588 + ,599917 + ,591573 + ,575489 + ,567223 + ,555338 + ,555252 + ,608249 + ,630859 + ,628632 + ,624435 + ,609670 + ,615830 + ,621170 + ,604212 + ,584348 + ,573717 + ,555234 + ,544897 + ,598866 + ,620081 + ,607699 + ,589960 + ,578665 + ,580166 + ,579457 + ,571560 + ,560460 + ,551397 + ,536763 + ,540562 + ,588184 + ,607049 + ,598968 + ,577644 + ,562640 + ,565867 + ,561274 + ,554144 + ,539900 + ,526271 + ,511841 + ,505282 + ,554083 + ,584225 + ,568858 + ,539516 + ,521612 + ,525562 + ,526519 + ,515713 + ,503454 + ,489301 + ,479020 + ,475102 + ,523682 + ,551528 + ,531626 + ,511037 + ,492417 + ,492188 + ,492865 + ,480961 + ,461935 + ,456608 + ,441977 + ,439148 + ,488180 + ,520564 + ,501492 + ,485025 + ,464196 + ,460170 + ,467037 + ,460070 + ,447988 + ,442867 + ,436087 + ,431328 + ,484015 + ,509673 + ,512927 + ,502831 + ,470984 + ,471067 + ,476049 + ,474605 + ,470439 + ,461251 + ,454724 + ,455626 + ,516847 + ,525192 + ,522975 + ,518585 + ,509239 + ,512238 + ,519164 + ,517009 + ,509933 + ,509127 + ,500857 + ,506971 + ,569323 + ,579714 + ,577992 + ,565464 + ,547344 + ,554788 + ,562325 + ,560854 + ,555332 + ,543599 + ,536662 + ,542722 + ,593530 + ,610763 + ,612613 + ,611324 + ,594167 + ,595454 + ,590865 + ,589379 + ,584428 + ,573100 + ,567456 + ,569028 + ,620735 + ,628884 + ,628232 + ,612117 + ,595404 + ,597141 + ,593408 + ,590072 + ,579799 + ,574205 + ,572775 + ,572942 + ,619567 + ,625809 + ,619916 + ,587625 + ,565742 + ,557274 + ,560576 + ,548854 + ,531673 + ,525919 + ,511038 + ,498662 + ,555362 + ,564591 + ,541657 + ,527070 + ,509846 + ,514258 + ,516922 + ,507561 + ,492622 + ,490243 + ,469357 + ,477580 + ,528379 + ,533590 + ,517945 + ,506174) > 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] 525776.2 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 3512.784 > (armose <- arm / armse) [1] 149.6751 > (geo <- geomean(x)) [1] 521851.4 > (har <- harmean(x)) [1] 517766.7 > (qua <- quamean(x)) [1] 529529.6 > (win <- winmean(x)) [,1] [,2] [1,] 525762.0 3511.375 [2,] 525815.7 3503.088 [3,] 525908.4 3490.638 [4,] 525909.7 3485.536 [5,] 525953.4 3479.279 [6,] 525962.9 3476.515 [7,] 525980.8 3472.604 [8,] 526096.3 3448.284 [9,] 526129.9 3443.612 [10,] 526110.9 3437.948 [11,] 526274.7 3411.586 [12,] 526525.8 3377.235 [13,] 526578.5 3363.405 [14,] 526573.8 3360.295 [15,] 526600.2 3351.851 [16,] 526638.2 3346.465 [17,] 526647.0 3342.131 [18,] 526738.1 3331.222 [19,] 526662.6 3320.979 [20,] 526728.3 3302.703 [21,] 526677.9 3296.871 [22,] 526525.2 3283.910 [23,] 526489.7 3274.983 [24,] 526508.3 3266.536 [25,] 526736.8 3233.634 [26,] 526742.7 3225.100 [27,] 526714.0 3211.750 [28,] 526665.2 3194.834 [29,] 526694.1 3183.561 [30,] 526646.2 3177.591 [31,] 526645.2 3169.747 [32,] 527012.8 3134.449 [33,] 527048.6 3130.912 [34,] 527223.9 3096.270 [35,] 527236.8 3091.126 [36,] 527444.7 3054.806 [37,] 527255.6 3023.322 [38,] 527240.0 3017.614 [39,] 527081.1 3003.939 [40,] 527041.7 2988.245 [41,] 527101.4 2980.974 [42,] 527255.5 2961.881 [43,] 527348.6 2923.079 [44,] 527479.1 2887.855 [45,] 527534.7 2870.820 [46,] 527579.4 2865.994 [47,] 527654.9 2852.347 [48,] 527890.2 2812.006 [49,] 527976.1 2801.919 [50,] 527936.2 2794.117 [51,] 528034.4 2785.196 [52,] 528066.3 2779.610 [53,] 528083.9 2734.442 [54,] 528202.3 2722.738 [55,] 528286.9 2714.298 [56,] 528219.2 2702.838 [57,] 528096.6 2691.344 [58,] 528113.0 2687.024 [59,] 528148.1 2668.300 [60,] 528119.6 2663.337 [61,] 528071.7 2640.587 [62,] 528399.4 2599.214 [63,] 528522.9 2552.893 [64,] 528651.7 2534.871 [65,] 529025.9 2493.034 [66,] 528869.3 2469.981 [67,] 528993.5 2458.337 [68,] 528979.4 2455.638 [69,] 528216.7 2388.029 [70,] 528232.4 2386.520 [71,] 528942.6 2324.243 [72,] 529042.6 2315.400 [73,] 529238.0 2298.554 [74,] 529200.1 2292.993 [75,] 529042.6 2278.488 [76,] 529196.0 2245.272 [77,] 529196.5 2233.655 [78,] 528938.5 2179.793 [79,] 529306.3 2152.483 [80,] 529132.1 2127.076 [81,] 529279.0 2111.891 [82,] 529291.5 2094.078 [83,] 529712.7 2059.241 [84,] 529874.7 2034.356 [85,] 530689.1 1976.618 [86,] 530673.6 1972.009 [87,] 530904.3 1950.592 [88,] 531018.0 1931.233 [89,] 530862.7 1913.505 [90,] 530853.2 1909.428 [91,] 530538.9 1877.826 [92,] 530939.8 1845.462 [93,] 530999.6 1840.720 [94,] 530868.5 1824.246 [95,] 530853.1 1813.855 [96,] 531068.1 1793.254 [97,] 531196.1 1744.749 [98,] 531163.6 1732.053 [99,] 531981.4 1670.934 [100,] 531651.3 1637.688 [101,] 531945.5 1614.305 [102,] 532216.0 1586.368 [103,] 531953.7 1567.147 [104,] 531938.8 1544.792 [105,] 531730.8 1528.981 [106,] 531699.5 1514.001 [107,] 531784.6 1497.217 > (tri <- trimean(x)) [,1] [,2] [1,] 525776.2 3481.524 [2,] 525935.1 3450.480 [3,] 526260.6 3422.607 [4,] 526260.6 3398.128 [5,] 526502.5 3374.082 [6,] 526616.6 3350.484 [7,] 526730.5 3326.466 [8,] 526730.5 3302.130 [9,] 526942.2 3280.417 [10,] 527038.4 3258.447 [11,] 527137.9 3236.266 [12,] 527222.7 3216.166 [13,] 527285.9 3198.851 [14,] 527345.5 3182.164 [15,] 527406.3 3165.056 [16,] 527406.3 3147.962 [17,] 527523.8 3130.588 [18,] 527581.8 3112.811 [19,] 527635.0 3095.110 [20,] 527693.4 3077.390 [21,] 527748.9 3060.203 [22,] 527808.0 3042.653 [23,] 527876.0 3025.177 [24,] 527946.9 3007.494 [25,] 527946.9 2989.548 [26,] 528078.9 2972.848 [27,] 528140.7 2955.893 [28,] 528204.6 2938.939 [29,] 528271.7 2922.169 [30,] 528338.6 2905.250 [31,] 528408.4 2887.854 [32,] 528408.4 2870.057 [33,] 528537.1 2853.362 [34,] 528594.2 2836.043 [35,] 528645.7 2819.725 [36,] 528697.6 2802.864 [37,] 528742.8 2787.051 [38,] 528795.4 2772.022 [39,] 528849.4 2756.501 [40,] 528909.7 2740.844 [41,] 528972.4 2725.140 [42,] 529034.1 2708.970 [43,] 529091.9 2692.892 [44,] 529147.7 2677.841 [45,] 529147.7 2663.666 [46,] 529252.1 2649.518 [47,] 529303.5 2634.809 [48,] 529353.5 2619.925 [49,] 529397.3 2606.108 [50,] 529397.3 2591.969 [51,] 529483.4 2577.369 [52,] 529525.3 2562.340 [53,] 529567.2 2546.693 [54,] 529609.3 2532.229 [55,] 529648.9 2517.447 [56,] 529686.8 2502.168 [57,] 529727.4 2486.487 [58,] 529772.1 2470.372 [59,] 529817.3 2453.467 [60,] 529862.4 2436.402 [61,] 529909.1 2418.502 [62,] 529958.1 2400.559 [63,] 529999.4 2383.490 [64,] 529999.4 2367.538 [65,] 530074.7 2351.403 [66,] 530102.0 2336.217 [67,] 530134.0 2321.087 [68,] 530163.5 2305.486 [69,] 530193.9 2288.935 [70,] 530244.6 2274.433 [71,] 530296.1 2258.963 [72,] 530330.5 2245.478 [73,] 530363.3 2231.426 [74,] 530391.8 2217.161 [75,] 530421.9 2202.091 [76,] 530456.8 2186.592 [77,] 530488.6 2171.599 [78,] 530521.1 2156.030 [79,] 530561.0 2141.964 [80,] 530592.5 2128.192 [81,] 530592.5 2114.572 [82,] 530663.2 2100.613 [83,] 530697.8 2086.409 [84,] 530722.6 2072.876 [85,] 530744.0 2059.496 [86,] 530745.3 2048.033 [87,] 530747.2 2035.738 [88,] 530743.2 2023.454 [89,] 530736.2 2011.062 [90,] 530736.2 1998.464 [91,] 530729.9 1984.864 [92,] 530734.8 1971.759 [93,] 530729.5 1959.223 [94,] 530722.5 1945.671 [95,] 530718.8 1931.722 [96,] 530715.2 1916.962 [97,] 530706.0 1901.949 [98,] 530693.1 1888.414 [99,] 530680.6 1874.198 [100,] 530680.6 1862.262 [101,] 530619.0 1851.098 [102,] 530583.1 1840.030 [103,] 530538.7 1829.349 [104,] 530499.9 1818.605 [105,] 530460.1 1807.950 [106,] 530424.7 1796.969 [107,] 530388.8 1785.531 > (midr <- midrange(x)) [1] 500351 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 530320.8 530592.5 530592.5 530592.5 530629.3 530592.5 530592.5 530592.5 > postscript(file="/var/www/html/rcomp/tmp/1iuv61229877002.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/2q59m1229877002.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/3rsiu1229877003.tab") > > system("convert tmp/1iuv61229877002.ps tmp/1iuv61229877002.png") > system("convert tmp/2q59m1229877002.ps tmp/2q59m1229877002.png") > > > proc.time() user system elapsed 1.841 0.354 3.430