R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(235.10 + ,280.70 + ,264.60 + ,240.70 + ,201.40 + ,240.80 + ,241.10 + ,223.80 + ,206.10 + ,174.70 + ,203.30 + ,220.50 + ,299.50 + ,347.40 + ,338.30 + ,327.70 + ,351.60 + ,396.60 + ,438.80 + ,395.60 + ,363.50 + ,378.80 + ,357.00 + ,369.00 + ,464.80 + ,479.10 + ,431.30 + ,366.50 + ,326.30 + ,355.10 + ,331.60 + ,261.30 + ,249.00 + ,205.50 + ,235.60 + ,240.90 + ,264.90 + ,253.80 + ,232.30 + ,193.80 + ,177.00 + ,213.20 + ,207.20 + ,180.60 + ,188.60 + ,175.40 + ,199.00 + ,179.60 + ,225.80 + ,234.00 + ,200.20 + ,183.60 + ,178.20 + ,203.20 + ,208.50 + ,191.80 + ,172.80 + ,148.00 + ,159.40 + ,154.50 + ,213.20 + ,196.40 + ,182.80 + ,176.40 + ,153.60 + ,173.20 + ,171.00 + ,151.20 + ,161.90 + ,157.20 + ,201.70 + ,236.40 + ,356.10 + ,398.30 + ,403.70 + ,384.60 + ,365.80 + ,368.10 + ,367.90 + ,347.00 + ,343.30 + ,292.90 + ,311.50 + ,300.90 + ,366.90 + ,356.90 + ,329.70 + ,316.20 + ,269.00 + ,289.30 + ,266.20 + ,253.60 + ,233.80 + ,228.40 + ,253.60 + ,260.10 + ,306.60 + ,309.20 + ,309.50 + ,271.00 + ,279.90 + ,317.90 + ,298.40 + ,246.70 + ,227.30 + ,209.10 + ,259.90 + ,266.00 + ,320.60 + ,308.50 + ,282.20 + ,262.70 + ,263.50 + ,313.10 + ,284.30 + ,252.60 + ,250.30 + ,246.50 + ,312.70 + ,333.20 + ,446.40 + ,511.60 + ,515.50 + ,506.40 + ,483.20 + ,522.30 + ,509.80 + ,460.70 + ,405.80 + ,375.00 + ,378.50 + ,406.80 + ,467.80 + ,469.80 + ,429.80 + ,355.80 + ,332.70 + ,378.00 + ,360.50 + ,334.70 + ,319.50 + ,323.10 + ,363.60 + ,352.10 + ,411.90 + ,388.60 + ,416.40 + ,360.70 + ,338.00 + ,417.20 + ,388.40 + ,371.10 + ,331.50 + ,353.70 + ,396.70 + ,447.00 + ,533.50 + ,565.40 + ,542.30 + ,488.70 + ,467.10 + ,531.30 + ,496.10 + ,444.00 + ,403.40 + ,386.30 + ,394.10 + ,404.10 + ,462.10 + ,448.10 + ,432.30 + ,386.30 + ,395.20 + ,421.90 + ,382.90 + ,384.20 + ,345.50 + ,323.40 + ,372.60 + ,376.00 + ,462.70 + ,487.00 + ,444.20 + ,399.30 + ,394.90 + ,455.40 + ,414.00 + ,375.50 + ,347.00 + ,339.40 + ,385.80 + ,378.80 + ,451.80 + ,446.10 + ,422.50 + ,383.10 + ,352.80 + ,445.30 + ,367.50 + ,355.10 + ,326.20 + ,319.80 + ,331.80 + ,340.90 + ,394.10 + ,417.20 + ,369.90 + ,349.20 + ,321.40 + ,405.70 + ,342.90 + ,316.50 + ,284.20 + ,270.90 + ,288.80 + ,278.80 + ,324.40 + ,310.90 + ,299.00 + ,273.00 + ,279.30 + ,359.20 + ,305.00 + ,282.10 + ,250.30 + ,246.50 + ,257.90 + ,266.50 + ,315.90 + ,318.40 + ,295.40 + ,266.40 + ,245.80 + ,362.80 + ,324.90 + ,294.20 + ,289.50 + ,295.20 + ,290.30 + ,272.00 + ,307.40 + ,328.70 + ,292.90 + ,249.10 + ,230.40 + ,361.50 + ,321.70 + ,277.20 + ,260.70 + ,251.00 + ,257.60 + ,241.80 + ,287.50 + ,292.30 + ,274.70 + ,254.20 + ,230.00 + ,339.00 + ,318.20 + ,287.00 + ,295.80 + ,284.00 + ,271.00 + ,262.70 + ,340.60 + ,379.40 + ,373.30 + ,355.20 + ,338.40 + ,466.90 + ,451.00 + ,422.00 + ,429.20 + ,425.90 + ,460.70 + ,463.60 + ,541.40 + ,544.20 + ,517.50 + ,469.40 + ,439.40 + ,549.00 + ,533.00 + ,506.10 + ,484.00 + ,457.00 + ,481.50 + ,469.50 + ,544.70 + ,541.20 + ,521.50 + ,469.70 + ,434.40 + ,542.60 + ,517.30 + ,485.70 + ,465.80 + ,447.00 + ,426.60 + ,411.60 + ,467.50 + ,484.50 + ,451.20 + ,417.40 + ,379.90 + ,484.70 + ,455.00 + ,420.80 + ,416.50 + ,376.30 + ,405.60 + ,405.80 + ,500.80 + ,514.00 + ,475.50 + ,430.10 + ,414.40 + ,538.00 + ,526.00 + ,488.50 + ,520.20 + ,504.40 + ,568.50 + ,610.60 + ,818.00 + ,830.90 + ,835.90 + ,782.00 + ,762.30 + ,856.90 + ,820.90 + ,769.60 + ,752.20 + ,724.40 + ,723.10 + ,719.50 + ,817.40 + ,803.30 + ,752.50 + ,689.00 + ,630.40 + ,765.50 + ,757.70 + ,732.20 + ,702.60 + ,683.30 + ,709.50 + ,702.20 + ,784.80 + ,810.90 + ,755.60 + ,656.80 + ,615.10 + ,745.30 + ,694.10 + ,675.70 + ,643.70 + ,622.10 + ,634.60 + ,588.00 + ,689.70 + ,673.90 + ,647.90 + ,568.80 + ,545.70 + ,632.60 + ,643.80 + ,593.10 + ,579.70 + ,546.00 + ,562.90 + ,572.50) > 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] 393.0425 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 8.039006 > (armose <- arm / armse) [1] 48.89192 > (geo <- geomean(x)) [1] 364.983 > (har <- harmean(x)) [1] 339.0531 > (qua <- quamean(x)) [1] 422.4435 > (win <- winmean(x)) [,1] [,2] [1,] 392.9946 8.029717 [2,] 392.9806 8.024700 [3,] 392.9073 8.012380 [4,] 392.9051 8.005587 [5,] 392.9266 8.002097 [6,] 392.8621 7.984046 [7,] 392.8903 7.950889 [8,] 392.5312 7.893655 [9,] 392.4731 7.883882 [10,] 392.1801 7.837030 [11,] 392.0796 7.819812 [12,] 392.0086 7.804162 [13,] 391.8688 7.782137 [14,] 391.8349 7.768788 [15,] 391.7664 7.748882 [16,] 391.7965 7.744095 [17,] 391.5817 7.697418 [18,] 390.9866 7.617054 [19,] 390.8435 7.550692 [20,] 390.9457 7.530034 [21,] 390.8554 7.497924 [22,] 390.4177 7.417834 [23,] 390.1519 7.357389 [24,] 390.2035 7.349027 [25,] 389.7398 7.281593 [26,] 389.4532 7.245632 [27,] 389.5113 7.232377 [28,] 389.0898 7.184230 [29,] 388.6688 7.107347 [30,] 388.5720 7.088212 [31,] 387.2387 6.929781 [32,] 386.5849 6.842398 [33,] 386.2745 6.801382 [34,] 386.6401 6.774362 [35,] 385.7839 6.687640 [36,] 386.2968 6.619810 [37,] 386.4062 6.575878 [38,] 385.7626 6.478181 [39,] 385.1860 6.396078 [40,] 384.8204 6.341552 [41,] 383.0680 6.148371 [42,] 382.5374 6.092656 [43,] 381.7976 5.991560 [44,] 381.1234 5.904513 [45,] 380.7000 5.863982 [46,] 380.7989 5.851625 [47,] 380.4704 5.813660 [48,] 380.2511 5.779161 [49,] 378.9866 5.588162 [50,] 378.5968 5.554352 [51,] 378.5694 5.550096 [52,] 378.4575 5.536897 [53,] 378.4860 5.524475 [54,] 378.8344 5.467305 [55,] 378.8935 5.456946 [56,] 378.7581 5.446026 [57,] 378.7581 5.441554 [58,] 378.6177 5.378177 [59,] 377.9199 5.320510 [60,] 378.0328 5.301555 [61,] 377.7540 5.279647 [62,] 376.9874 5.203326 [63,] 376.6317 5.137536 [64,] 376.6661 5.115850 [65,] 376.4390 5.098551 [66,] 375.9954 5.059986 [67,] 376.0315 5.052585 [68,] 376.3239 4.987676 [69,] 376.1013 4.963224 [70,] 376.0261 4.905404 [71,] 375.7207 4.877443 [72,] 375.1788 4.821498 [73,] 375.2376 4.809653 [74,] 375.1780 4.767151 [75,] 374.4522 4.714419 [76,] 373.6554 4.635091 [77,] 372.3513 4.512698 [78,] 372.3723 4.505738 [79,] 372.2874 4.468655 [80,] 372.0508 4.446594 [81,] 371.8766 4.428823 [82,] 371.8546 4.424382 [83,] 372.3008 4.381094 [84,] 372.5492 4.341510 [85,] 372.1836 4.313457 [86,] 371.6288 4.275711 [87,] 371.0207 4.204147 [88,] 369.9089 4.099652 [89,] 370.2917 4.072255 [90,] 370.8481 4.030994 [91,] 371.2151 4.004952 [92,] 370.9430 3.971179 [93,] 371.0180 3.956929 [94,] 371.1191 3.937758 [95,] 371.4255 3.912335 [96,] 371.1675 3.892107 [97,] 371.3761 3.846197 [98,] 371.1126 3.822312 [99,] 370.8997 3.805081 [100,] 371.4642 3.750289 [101,] 371.2199 3.717337 [102,] 371.5763 3.695758 [103,] 370.6903 3.621178 [104,] 370.2989 3.589125 [105,] 370.4118 3.568227 [106,] 370.0699 3.475766 [107,] 370.0699 3.454434 [108,] 370.0118 3.450760 [109,] 369.5430 3.374284 [110,] 369.5134 3.336121 [111,] 369.5731 3.332540 [112,] 369.5129 3.314012 [113,] 370.2116 3.261190 [114,] 370.1503 3.234919 [115,] 369.9648 3.204493 [116,] 370.3390 3.174789 [117,] 370.1817 3.009018 [118,] 370.4989 2.967670 [119,] 369.3473 2.866065 [120,] 369.0247 2.804081 [121,] 368.9272 2.771085 [122,] 368.6320 2.741537 [123,] 368.9957 2.708702 [124,] 368.9957 2.685055 > (tri <- trimean(x)) [,1] [,2] [1,] 392.4511 7.956785 [2,] 391.9016 7.881217 [3,] 391.3533 7.805554 [4,] 390.8239 7.731573 [5,] 390.2892 7.656740 [6,] 389.7442 7.579905 [7,] 389.2042 7.503652 [8,] 388.6539 7.430053 [9,] 388.1446 7.362248 [10,] 387.6364 7.293221 [11,] 387.1534 7.227400 [12,] 386.6747 7.161069 [13,] 386.6747 7.093890 [14,] 385.7250 7.026361 [15,] 385.2503 6.957491 [16,] 384.7750 6.887738 [17,] 384.2920 6.815644 [18,] 383.8173 6.744574 [19,] 383.3737 6.677144 [20,] 382.9331 6.612091 [21,] 382.4815 6.545930 [22,] 382.0293 6.479400 [23,] 381.5942 6.415775 [24,] 381.1670 6.353653 [25,] 380.7320 6.289531 [26,] 380.7320 6.227152 [27,] 379.9019 6.164490 [28,] 379.4829 6.100015 [29,] 379.0764 6.035804 [30,] 378.6821 5.973481 [31,] 378.2865 5.909640 [32,] 377.9377 5.852290 [33,] 377.6092 5.797445 [34,] 377.2878 5.742554 [35,] 376.9490 5.686697 [36,] 376.6360 5.633164 [37,] 376.3010 5.580730 [38,] 375.9578 5.528237 [39,] 375.6313 5.478494 [40,] 375.3192 5.430748 [41,] 375.0145 5.383638 [42,] 374.7608 5.343983 [43,] 374.5199 5.305274 [44,] 374.2982 5.269613 [45,] 374.0936 5.236393 [46,] 373.8986 5.203554 [47,] 373.6978 5.169776 [48,] 373.5036 5.136190 [49,] 373.3128 5.102617 [50,] 373.1544 5.075855 [51,] 373.1544 5.049308 [52,] 373.0044 5.021695 [53,] 372.7023 4.993344 [54,] 372.5485 4.964165 [55,] 372.3832 4.935930 [56,] 372.2138 4.906753 [57,] 372.0453 4.876630 [58,] 371.8742 4.845223 [59,] 371.7039 4.814931 [60,] 371.5484 4.785618 [61,] 371.3876 4.755605 [62,] 371.2310 4.725023 [63,] 371.2310 4.696139 [64,] 370.9566 4.668512 [65,] 370.8194 4.640332 [66,] 370.6854 4.611416 [67,] 370.5597 4.582620 [68,] 370.4309 4.552599 [69,] 370.2932 4.523623 [70,] 370.1582 4.494121 [71,] 370.0226 4.465418 [72,] 369.8917 4.436334 [73,] 369.7708 4.408029 [74,] 369.6464 4.378624 [75,] 369.5212 4.349349 [76,] 369.4100 4.320710 [77,] 369.3147 4.293833 [78,] 369.2468 4.270570 [79,] 369.1771 4.246195 [80,] 369.1080 4.221899 [81,] 369.0429 4.197065 [82,] 368.9803 4.171471 [83,] 368.9170 4.144492 [84,] 368.8426 4.117668 [85,] 368.7614 4.090850 [86,] 368.6865 4.063591 [87,] 368.6222 4.036297 [88,] 368.5699 4.010434 [89,] 368.5407 3.987498 [90,] 368.5026 3.964191 [91,] 368.4516 3.941074 [92,] 368.3915 3.917483 [93,] 368.3360 3.893779 [94,] 368.2777 3.869043 [95,] 368.2159 3.843425 [96,] 368.1461 3.817130 [97,] 368.0803 3.789924 [98,] 368.0085 3.762909 [99,] 367.9408 3.735089 [100,] 367.8762 3.706077 [101,] 367.7976 3.677543 [102,] 367.7976 3.648526 [103,] 367.7226 3.618335 [104,] 367.6380 3.589748 [105,] 367.5105 3.560613 [106,] 367.4463 3.530250 [107,] 367.3880 3.502381 [108,] 367.3282 3.473364 [109,] 367.2682 3.442154 [110,] 367.2171 3.412627 [111,] 367.1653 3.382726 [112,] 367.1108 3.350455 [113,] 367.0562 3.316486 [114,] 366.9840 3.282599 [115,] 366.9113 3.247309 [116,] 366.8407 3.210768 [117,] 366.7594 3.172723 [118,] 366.6794 3.141709 [119,] 366.5896 3.110281 [120,] 366.5242 3.082499 [121,] 366.4646 3.055942 [122,] 366.4055 3.028816 [123,] 366.3516 3.000873 [124,] 366.2871 2.972152 > (midr <- midrange(x)) [1] 502.45 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 367.8599 368.3360 367.8599 368.3360 368.3360 367.8599 368.3360 368.3915 > postscript(file="/var/wessaorg/rcomp/tmp/1jweg1322312645.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/2vmjs1322312645.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/3vrvw1322312646.tab") > > try(system("convert tmp/1jweg1322312645.ps tmp/1jweg1322312645.png",intern=TRUE)) character(0) > try(system("convert tmp/2vmjs1322312645.ps tmp/2vmjs1322312645.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.186 0.194 2.456