R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(-3.3306690738755E-14 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,0.0053840193399668 + ,-0.021066849967766 + ,-4.6185277824407E-14 + ,0.021066849967754 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,-0.0053840193399664 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,0.0053840193399668 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,3.3750779948605E-14 + ,0.0003158060976336 + ,-4.8405723873657E-14 + ,-4.8405723873657E-14 + ,-4.8405723873657E-14 + ,-4.8405723873657E-14 + ,-0.0056998254376484 + ,-3.3306690738755E-14 + ,0.0056998254375666 + ,-0.0056998254376484 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,0.0056998254375666 + ,-4.8405723873657E-14 + ,-4.8405723873657E-14 + ,-0.010155593471648 + ,-0.0051167364592297 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,0.005116736459188 + ,-2.9753977059954E-14 + ,-2.9753977059954E-14 + ,-2.9753977059954E-14 + ,-2.9753977059954E-14 + ,-2.9753977059954E-14 + ,-2.9753977059954E-14 + ,-2.9753977059954E-14 + ,-0.0051167364592297 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,0.005116736459188 + ,-2.9753977059954E-14 + ,-0.0051167364592297 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,0.005116736459188 + ,-2.9753977059954E-14 + ,-0.0051167364592297 + ,-1.1990408665952E-14 + ,0.005116736459188 + ,-2.9753977059954E-14 + ,-0.0051167364592297 + ,-0.070734872477612 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,0.0061749767394632 + ,-0.0061749767394774 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,0.0061749767394632 + ,-0.0061749767394774 + ,-3.6859404417555E-14 + ,-3.6859404417555E-14 + ,-0.038587740776537 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-0.0068186160469095 + ,0.0068186160468917 + ,-9.7699626167014E-15 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-9.7699626167014E-15 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,-0.028119435314408 + ,-2.9309887850104E-14 + ,-2.9309887850104E-14 + ,0.028119435314371 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-9.7699626167014E-15 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-0.0068186160469095 + ,-7.9936057773011E-15 + ,-7.9936057773011E-15 + ,0.0068186160468917 + ,-9.7699626167014E-15 + ,0.0099644952593905 + ,-4.1300296516056E-14 + ,-4.1300296516056E-14 + ,-4.1300296516056E-14 + ,-4.1300296516056E-14 + ,-0.034585579649741 + ,3.8635761256955E-14 + ,3.8635761256955E-14 + ,0.034585579649739 + ,-4.1300296516056E-14 + ,0.015809217368258 + ,2.6201263381154E-14 + ,2.6201263381154E-14 + ,-1.1179688669752 + ,-3.3306690738755E-14) > 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] -0.006055451 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.005617685 > (armose <- arm / armse) [1] -1.077926 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -4.213568e-14 > (qua <- quamean(x)) [1] 0.07947822 > (win <- winmean(x)) [,1] [,2] [1,] -8.516121e-04 6.716809e-04 [2,] -6.006666e-04 5.088727e-04 [3,] -6.194987e-04 4.713254e-04 [4,] -6.070703e-04 4.078416e-04 [5,] -5.094026e-04 3.415709e-04 [6,] -1.820649e-04 2.577787e-04 [7,] -6.527072e-05 2.379764e-04 [8,] -6.527072e-05 2.379764e-04 [9,] -6.527072e-05 2.379764e-04 [10,] -6.527072e-05 2.379764e-04 [11,] -6.527072e-05 2.379764e-04 [12,] -6.527072e-05 2.379764e-04 [13,] -1.071073e-04 2.320880e-04 [14,] -1.071073e-04 2.320880e-04 [15,] -9.447067e-05 2.204522e-04 [16,] -9.447067e-05 2.204522e-04 [17,] -8.092633e-05 2.114378e-04 [18,] -8.092633e-05 2.114378e-04 [19,] -5.092475e-05 2.074965e-04 [20,] -5.092475e-05 2.074965e-04 [21,] -5.092475e-05 2.074965e-04 [22,] -5.092475e-05 2.074965e-04 [23,] -5.092475e-05 2.074965e-04 [24,] -5.092475e-05 2.074965e-04 [25,] -8.433511e-05 2.031480e-04 [26,] -4.958833e-05 1.986428e-04 [27,] -4.958833e-05 1.986428e-04 [28,] -4.958833e-05 1.986428e-04 [29,] -7.457232e-04 1.329395e-04 [30,] -7.930942e-04 1.312686e-04 [31,] -6.799006e-15 2.429838e-15 [32,] -7.580603e-15 2.358671e-15 [33,] -7.580603e-15 2.358671e-15 [34,] -7.580603e-15 2.358671e-15 [35,] -7.580603e-15 2.358671e-15 [36,] -7.580603e-15 2.358671e-15 [37,] -7.169820e-15 2.323471e-15 [38,] -6.241674e-15 2.247895e-15 [39,] -6.241674e-15 2.247895e-15 [40,] -6.241674e-15 2.247895e-15 [41,] -6.241674e-15 2.247895e-15 [42,] -6.241674e-15 2.247895e-15 [43,] -5.286882e-15 2.175624e-15 [44,] -5.286882e-15 2.175624e-15 [45,] -5.286882e-15 2.175624e-15 [46,] -5.286882e-15 2.175624e-15 [47,] -5.286882e-15 2.175624e-15 [48,] -5.286882e-15 2.175624e-15 [49,] -5.286882e-15 2.175624e-15 [50,] -5.286882e-15 2.175624e-15 [51,] -5.286882e-15 2.175624e-15 [52,] -5.286882e-15 2.175624e-15 [53,] -5.286882e-15 2.175624e-15 [54,] -4.327649e-15 2.107478e-15 [55,] -4.327649e-15 2.107478e-15 [56,] -4.327649e-15 2.107478e-15 [57,] -4.327649e-15 2.107478e-15 [58,] -4.327649e-15 2.107478e-15 [59,] -4.327649e-15 2.107478e-15 [60,] -4.327649e-15 2.107478e-15 [61,] -4.327649e-15 2.107478e-15 [62,] -4.327649e-15 2.107478e-15 [63,] -4.327649e-15 2.107478e-15 [64,] -4.327649e-15 2.107478e-15 [65,] -4.327649e-15 2.107478e-15 [66,] -4.327649e-15 2.107478e-15 > (tri <- trimean(x)) [,1] [,2] [1,] -6.449848e-04 5.598226e-04 [2,] -4.341405e-04 4.116257e-04 [3,] -3.483024e-04 3.488447e-04 [4,] -2.541370e-04 2.917503e-04 [5,] -1.612598e-04 2.496960e-04 [6,] -8.718681e-05 2.232457e-04 [7,] -7.018357e-05 2.158370e-04 [8,] -7.094643e-05 2.117658e-04 [9,] -7.172606e-05 2.074017e-04 [10,] -7.252302e-05 2.027142e-04 [11,] -7.333788e-05 1.976679e-04 [12,] -7.417127e-05 1.922207e-04 [13,] -7.502381e-05 1.863226e-04 [14,] -7.215409e-05 1.807103e-04 [15,] -6.921685e-05 1.746103e-04 [16,] -6.721258e-05 1.694288e-04 [17,] -6.516001e-05 1.637921e-04 [18,] -6.402900e-05 1.587127e-04 [19,] -6.287006e-05 1.531721e-04 [20,] -6.365594e-05 1.475620e-04 [21,] -6.446171e-05 1.413987e-04 [22,] -6.528814e-05 1.345853e-04 [23,] -6.613604e-05 1.269936e-04 [24,] -6.700625e-05 1.184469e-04 [25,] -6.789966e-05 1.086885e-04 [26,] -6.701126e-05 9.798556e-05 [27,] -6.792922e-05 8.598315e-05 [28,] -6.887269e-05 7.111494e-05 [29,] -6.887269e-05 5.084887e-05 [30,] -3.654812e-05 3.654812e-05 [31,] -7.658930e-15 2.490042e-15 [32,] -7.699723e-15 2.485463e-15 [33,] -7.705279e-15 2.484880e-15 [34,] -7.711004e-15 2.483686e-15 [35,] -7.716904e-15 2.481824e-15 [36,] -7.722989e-15 2.479230e-15 [37,] -7.729267e-15 2.475834e-15 [38,] -7.753654e-15 2.473888e-15 [39,] -7.818882e-15 2.475946e-15 [40,] -7.886284e-15 2.477433e-15 [41,] -7.955971e-15 2.478289e-15 [42,] -8.028061e-15 2.478444e-15 [43,] -8.102680e-15 2.477820e-15 [44,] -8.219615e-15 2.480783e-15 [45,] -8.340803e-15 2.483082e-15 [46,] -8.466479e-15 2.484635e-15 [47,] -8.596897e-15 2.485351e-15 [48,] -8.732331e-15 2.485126e-15 [49,] -8.873077e-15 2.483839e-15 [50,] -9.019452e-15 2.481356e-15 [51,] -9.171802e-15 2.477522e-15 [52,] -9.330499e-15 2.472160e-15 [53,] -9.495950e-15 2.465065e-15 [54,] -9.668594e-15 2.456000e-15 [55,] -9.888386e-15 2.449261e-15 [56,] -1.011817e-14 2.440343e-15 [57,] -1.011817e-14 2.428919e-15 [58,] -1.035864e-14 2.414601e-15 [59,] -1.087477e-14 2.396929e-15 [60,] -1.115219e-14 2.375350e-15 [61,] -1.144384e-14 2.349199e-15 [62,] -1.175083e-14 2.317661e-15 [63,] -1.207443e-14 2.279727e-15 [64,] -1.241599e-14 2.234137e-15 [65,] -1.277708e-14 2.179281e-15 [66,] -1.315941e-14 2.113064e-15 > (midr <- midrange(x)) [1] -0.5416916 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] -4.419576e-15 -4.419576e-15 -4.419576e-15 -4.419576e-15 -4.419576e-15 [6] -4.419576e-15 -4.419576e-15 -4.419576e-15 > postscript(file="/var/www/rcomp/tmp/166fn1290525412.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/rcomp/tmp/29peb1290525412.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3mkpn1290525413.tab") > > try(system("convert tmp/166fn1290525412.ps tmp/166fn1290525412.png",intern=TRUE)) character(0) > try(system("convert tmp/29peb1290525412.ps tmp/29peb1290525412.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.400 0.560 1.941