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(-2.7089441800854E-14 + ,-0.0067221197756271 + ,0.0067221197756187 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-2.7089441800854E-14 + ,-0.0067221197756271 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.0017733645364189 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,-0.0063988842582678 + ,1.0658141036402E-14 + ,0.0063988842583105 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,-0.0063988842582678 + ,0.0063988842583105 + ,-0.0063988842582678 + ,0.0063988842583105 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,-0.0063988842582678 + ,1.0658141036402E-14 + ,0.0063988842583105 + ,-0.0063988842582678 + ,0.0063988842583105 + ,-0.0063988842582678 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,0.0063988842583105 + ,-0.0063988842582678 + ,1.0658141036402E-14 + ,0.0063988842583105 + ,-0.0063988842582678 + ,1.0658141036402E-14 + ,1.0658141036402E-14 + ,0.0063988842583105 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,3.1974423109205E-14 + ,0.0003542958407321 + ,-0.0063966102966977 + ,-5.3290705182008E-15 + ,-5.3290705182008E-15 + ,-5.3290705182008E-15 + ,0.0063966102966946 + ,2.2204460492503E-15 + ,-0.0039041753228979 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,-0.0064217131136641 + ,-1.5987211554602E-14 + ,-1.5987211554602E-14 + ,-1.5987211554602E-14 + ,-1.5987211554602E-14 + ,0.0064217131136841 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,-0.0064217131136641 + ,0.0064217131136841 + ,3.5971225997855E-14 + ,3.5971225997855E-14 + ,-0.017578928007164 + ,0.0064935293105748 + ,2.6201263381154E-14 + ,2.6201263381154E-14 + ,2.6201263381154E-14 + ,2.6201263381154E-14 + ,2.6201263381154E-14 + ,-0.0064935293105735 + ,-2.4868995751604E-14 + ,-0.011649203449725 + ,-1.3322676295502E-14 + ,-0.0058758891057136 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,0.0058758891056558 + ,-0.0058758891057136 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,0.0058758891056558 + ,-0.0058758891057136 + ,-4.4408920985006E-14 + ,0.0058758891056558 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-0.0058758891057136 + ,-4.4408920985006E-14 + ,0.0058758891056558 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-0.0058758891057136 + ,0.0058758891056558 + ,-0.0058758891057136 + ,0.0058758891056558 + ,-0.0058758891057136 + ,0.0058758891056558 + ,-0.0058758891057136 + ,0.0058758891056558 + ,-1.3322676295502E-14 + ,-1.3322676295502E-14 + ,-0.0058758891057136 + ,0.0058758891056558 + ,-0.0058758891057136 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,-4.4408920985006E-14 + ,0.0058758891056558 + ,-1.3322676295502E-14 + ,-0.011416069481314 + ,-2.9309887850104E-14 + ,0.0055401803755708 + ,0.010260258569556 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-0.035625288710512 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,0.01982484976529 + ,-2.9309887850104E-14 + ,-2.9309887850104E-14 + ,-0.019824849765329 + ,0.01982484976529 + ,-2.9309887850104E-14 + ,-2.9309887850104E-14 + ,-2.9309887850104E-14 + ,-2.9309887850104E-14 + ,0.015800438945171 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-0.035625288710512 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,0.03562528871049 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-14 + ,-1.1990408665952E-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.000166712 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.0004419155 > (armose <- arm / armse) [1] -0.3772486 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -1.972817e-13 > (qua <- quamean(x)) [1] 0.006236214 > (win <- winmean(x)) [,1] [,2] [1,] -2.457142e-04 4.160674e-04 [2,] -8.770979e-05 3.596524e-04 [3,] -1.143871e-04 3.349385e-04 [4,] -1.065962e-04 2.833077e-04 [5,] -1.892214e-04 2.681723e-04 [6,] -5.526058e-05 2.424673e-04 [7,] -5.777415e-05 2.421277e-04 [8,] -4.863053e-05 2.408807e-04 [9,] -4.642610e-05 2.403094e-04 [10,] -4.642610e-05 2.403094e-04 [11,] -4.517052e-05 2.401423e-04 [12,] -4.517052e-05 2.401423e-04 [13,] -4.517052e-05 2.401423e-04 [14,] -4.517052e-05 2.401423e-04 [15,] -4.517052e-05 2.401423e-04 [16,] -4.517052e-05 2.401423e-04 [17,] -4.536380e-05 2.401162e-04 [18,] -9.222871e-05 2.339513e-04 [19,] -9.201268e-05 2.339220e-04 [20,] -3.994056e-05 2.270302e-04 [21,] -3.994056e-05 2.270302e-04 [22,] -3.994056e-05 2.270302e-04 [23,] -3.994056e-05 2.270302e-04 [24,] -3.994056e-05 2.270302e-04 [25,] -3.994056e-05 2.270302e-04 [26,] -3.994056e-05 2.270302e-04 [27,] -3.994056e-05 2.270302e-04 [28,] -8.693979e-05 2.209446e-04 [29,] -6.331281e-04 1.636061e-04 [30,] -5.502313e-04 1.022192e-04 [31,] -3.745892e-15 2.203244e-15 [32,] -3.745892e-15 2.203244e-15 [33,] -3.745892e-15 2.203244e-15 [34,] -3.745892e-15 2.203244e-15 [35,] -3.745892e-15 2.203244e-15 [36,] -3.745892e-15 2.203244e-15 [37,] -3.745892e-15 2.203244e-15 [38,] -3.745892e-15 2.203244e-15 [39,] -3.745892e-15 2.203244e-15 [40,] -3.745892e-15 2.203244e-15 [41,] -3.745892e-15 2.203244e-15 [42,] -4.585221e-15 2.128983e-15 [43,] -4.585221e-15 2.128983e-15 [44,] -4.585221e-15 2.128983e-15 [45,] -4.585221e-15 2.128983e-15 [46,] -4.585221e-15 2.128983e-15 [47,] -4.585221e-15 2.128983e-15 [48,] -9.614531e-16 1.814156e-15 [49,] -9.614531e-16 1.814156e-15 [50,] -9.614531e-16 1.814156e-15 [51,] -9.614531e-16 1.814156e-15 [52,] -9.614531e-16 1.814156e-15 [53,] -9.614531e-16 1.814156e-15 [54,] -9.614531e-16 1.814156e-15 [55,] -3.508305e-16 1.766955e-15 [56,] -3.508305e-16 1.766955e-15 [57,] -3.508305e-16 1.766955e-15 [58,] -3.508305e-16 1.766955e-15 [59,] -2.053913e-15 1.613590e-15 [60,] -2.053913e-15 1.613590e-15 [61,] -2.053913e-15 1.613590e-15 [62,] -2.053913e-15 1.613590e-15 [63,] -2.053913e-15 1.613590e-15 [64,] -4.469758e-15 1.407111e-15 [65,] -4.469758e-15 1.407111e-15 [66,] -7.107648e-15 1.199154e-15 > (tri <- trimean(x)) [,1] [,2] [1,] -1.683959e-04 3.663167e-04 [2,] -8.949978e-05 3.058814e-04 [3,] -9.042246e-05 2.729713e-04 [4,] -8.210140e-05 2.466811e-04 [5,] -7.565539e-05 2.354527e-04 [6,] -5.149242e-05 2.272692e-04 [7,] -5.081712e-05 2.241273e-04 [8,] -4.973683e-05 2.208350e-04 [9,] -4.988880e-05 2.175247e-04 [10,] -5.031629e-05 2.140712e-04 [11,] -5.075339e-05 2.103721e-04 [12,] -5.133013e-05 2.064265e-04 [13,] -5.192013e-05 2.021864e-04 [14,] -5.252386e-05 1.976205e-04 [15,] -5.314178e-05 1.926924e-04 [16,] -5.377442e-05 1.873588e-04 [17,] -5.442231e-05 1.815677e-04 [18,] -5.507213e-05 1.752590e-04 [19,] -5.252367e-05 1.690843e-04 [20,] -4.992570e-05 1.623187e-04 [21,] -5.055768e-05 1.556820e-04 [22,] -5.120585e-05 1.483522e-04 [23,] -5.187086e-05 1.401954e-04 [24,] -5.255337e-05 1.310280e-04 [25,] -5.325409e-05 1.205858e-04 [26,] -5.397374e-05 1.084608e-04 [27,] -5.471310e-05 9.395367e-05 [28,] -5.547301e-05 7.564009e-05 [29,] -5.547301e-05 5.126831e-05 [30,] -2.535628e-05 2.801968e-05 [31,] -3.533405e-15 2.218321e-15 [32,] -3.523325e-15 2.211625e-15 [33,] -3.512944e-15 2.204001e-15 [34,] -3.502249e-15 2.195366e-15 [35,] -3.491224e-15 2.185624e-15 [36,] -3.479855e-15 2.174674e-15 [37,] -3.468125e-15 2.162397e-15 [38,] -3.456017e-15 2.148663e-15 [39,] -3.443511e-15 2.133326e-15 [40,] -3.430589e-15 2.116220e-15 [41,] -3.417229e-15 2.097155e-15 [42,] -3.403408e-15 2.075917e-15 [43,] -3.354042e-15 2.057897e-15 [44,] -3.302913e-15 2.037704e-15 [45,] -3.249926e-15 2.015083e-15 [46,] -3.194975e-15 1.989740e-15 [47,] -3.137951e-15 1.961332e-15 [48,] -3.078734e-15 1.929455e-15 [49,] -3.165224e-15 1.919589e-15 [50,] -3.255174e-15 1.908034e-15 [51,] -3.348795e-15 1.894577e-15 [52,] -3.446317e-15 1.878971e-15 [53,] -3.547989e-15 1.860925e-15 [54,] -3.654082e-15 1.840101e-15 [55,] -3.764890e-15 1.816097e-15 [56,] -3.905966e-15 1.792369e-15 [57,] -3.905966e-15 1.764865e-15 [58,] -4.053605e-15 1.732967e-15 [59,] -4.370488e-15 1.695915e-15 [60,] -4.468648e-15 1.671224e-15 [61,] -4.571841e-15 1.642271e-15 [62,] -4.680467e-15 1.608289e-15 [63,] -4.794963e-15 1.568312e-15 [64,] -4.915821e-15 1.521103e-15 [65,] -4.935734e-15 1.494004e-15 [66,] -4.956819e-15 1.461655e-15 > (midr <- midrange(x)) [1] -1.100162e-14 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] -1.166743e-15 -1.166743e-15 -1.166743e-15 -1.166743e-15 -1.166743e-15 [6] -1.166743e-15 -1.166743e-15 -1.166743e-15 > postscript(file="/var/www/html/rcomp/tmp/16xv11290526053.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/2ypum1290526053.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/31a3l1290526053.tab") > > try(system("convert tmp/16xv11290526053.ps tmp/16xv11290526053.png",intern=TRUE)) character(0) > try(system("convert tmp/2ypum1290526053.ps tmp/2ypum1290526053.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.032 0.340 2.133