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(0.0017356093451131 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.0028943580263334 + ,3.1086244689504E-14 + ,0.0028943580263312 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.00057820180853341 + ,8.8817841970013E-16 + ,-0.0023161562177991 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,0.0023161562178311 + ,-0.0023161562177991 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,0.0028943580263312 + ,-3.3306690738755E-14 + ,-0.0028943580263334 + ,3.1086244689504E-14 + ,0.0028943580263312 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.0028943580263334 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,3.1086244689504E-14 + ,0.0028943580263312 + ,-0.0028943580263334 + ,3.1086244689504E-14 + ,0.0028943580263312 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-3.3306690738755E-14 + ,-0.0028943580263334 + ,3.1086244689504E-14 + ,-0.0063972303077691 + ,-3.3750779948605E-14 + ,-3.3750779948605E-14 + ,-0.018251904966934 + ,-1.4654943925052E-14 + ,-0.050574285962915 + ,0.050574285962919 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-0.010752791776214 + ,0.010752791776247 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-0.010752791776214 + ,0.010752791776247 + ,-1.4654943925052E-14 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-0.010752791776214 + ,4.7517545453957E-14 + ,0.010752791776247 + ,-1.4654943925052E-14 + ,-0.0059594932040148 + ,-0.035902852156933 + ,-0.011215070820103 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,0.011215070820137 + ,-2.6645352591004E-15 + ,-0.011215070820103 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,0.011215070820137 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-0.011215070820103 + ,0.011215070820137 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-0.011215070820103 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,0.011215070820137 + ,-2.6645352591004E-15 + ,-0.011215070820103 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,0.011215070820137 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-0.011215070820103 + ,0.011215070820137 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-2.6645352591004E-15 + ,-0.011215070820103 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,3.7303493627405E-14 + ,-0.062035390919463 + ,0.02566774674859 + ,1.1990408665952E-14 + ,-0.65427640617099 + ,-3.5527136788005E-14 + ,-3.5527136788005E-14 + ,-3.5527136788005E-14 + ,0.65427640617096 + ,-0.025667746748588 + ,0.02566774674859 + ,1.1990408665952E-14 + ,1.1990408665952E-14 + ,-0.025667746748588) > 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.0007046035 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.004684532 > (armose <- arm / armse) [1] -0.1504106 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -1.692385e-14 > (qua <- quamean(x)) [1] 0.06608721 > (win <- winmean(x)) [,1] [,2] [1,] -7.619090e-04 7.706724e-04 [2,] -8.963633e-04 6.576749e-04 [3,] -6.762918e-04 5.819291e-04 [4,] -7.606432e-04 4.702384e-04 [5,] -7.606432e-04 4.702384e-04 [6,] -5.381680e-04 4.165039e-04 [7,] -2.918788e-04 3.715286e-04 [8,] -2.918788e-04 3.715286e-04 [9,] -2.918788e-04 3.715286e-04 [10,] -3.149927e-04 3.679829e-04 [11,] -3.149927e-04 3.679829e-04 [12,] -3.149927e-04 3.679829e-04 [13,] -3.149927e-04 3.679829e-04 [14,] -2.826332e-04 3.632305e-04 [15,] -2.826332e-04 3.632305e-04 [16,] -2.826332e-04 3.632305e-04 [17,] -2.826332e-04 3.632305e-04 [18,] -2.826332e-04 3.632305e-04 [19,] -2.826332e-04 3.632305e-04 [20,] -1.068477e-03 2.696458e-04 [21,] -1.068477e-03 2.696458e-04 [22,] -1.068477e-03 2.696458e-04 [23,] -1.068477e-03 2.696458e-04 [24,] -5.458092e-04 1.786189e-04 [25,] -5.633673e-04 1.628399e-04 [26,] -2.403708e-04 9.249984e-05 [27,] -4.746781e-04 7.530444e-05 [28,] -4.746781e-04 7.530444e-05 [29,] -4.746781e-04 7.530444e-05 [30,] -4.746781e-04 7.530444e-05 [31,] -3.850568e-04 6.092084e-05 [32,] -3.850568e-04 6.092084e-05 [33,] -9.829431e-05 1.539630e-05 [34,] 6.994405e-15 2.391392e-15 [35,] 6.994405e-15 2.391392e-15 [36,] 6.994405e-15 2.391392e-15 [37,] 7.323031e-15 2.362352e-15 [38,] 7.323031e-15 2.362352e-15 [39,] 7.409628e-15 2.354806e-15 [40,] 7.409628e-15 2.354806e-15 [41,] 7.409628e-15 2.354806e-15 [42,] 7.409628e-15 2.354806e-15 [43,] 7.409628e-15 2.354806e-15 [44,] 7.409628e-15 2.354806e-15 [45,] 7.409628e-15 2.354806e-15 [46,] 7.409628e-15 2.354806e-15 [47,] 7.409628e-15 2.354806e-15 [48,] 4.958256e-15 2.156989e-15 [49,] 4.958256e-15 2.156989e-15 [50,] 4.958256e-15 2.156989e-15 [51,] 4.958256e-15 2.156989e-15 [52,] 4.958256e-15 2.156989e-15 [53,] 4.958256e-15 2.156989e-15 [54,] 4.958256e-15 2.156989e-15 [55,] 4.958256e-15 2.156989e-15 [56,] 4.958256e-15 2.156989e-15 [57,] 4.958256e-15 2.156989e-15 [58,] 4.958256e-15 2.156989e-15 [59,] 4.958256e-15 2.156989e-15 [60,] 4.958256e-15 2.156989e-15 [61,] 4.958256e-15 2.156989e-15 [62,] 4.958256e-15 2.156989e-15 [63,] 1.083356e-14 1.664433e-15 [64,] 1.083356e-14 1.664433e-15 [65,] 1.083356e-14 1.664433e-15 [66,] 1.083356e-14 1.664433e-15 > (tri <- trimean(x)) [,1] [,2] [1,] -7.117207e-04 6.649784e-04 [2,] -6.605081e-04 5.329770e-04 [3,] -5.389332e-04 4.525895e-04 [4,] -4.912393e-04 3.953427e-04 [5,] -4.203435e-04 3.716429e-04 [6,] -3.479393e-04 3.450655e-04 [7,] -3.138481e-04 3.293085e-04 [8,] -3.172595e-04 3.214720e-04 [9,] -3.207459e-04 3.130365e-04 [10,] -3.243098e-04 3.039306e-04 [11,] -3.253566e-04 2.946320e-04 [12,] -3.264273e-04 2.845400e-04 [13,] -3.275225e-04 2.735396e-04 [14,] -3.286433e-04 2.614856e-04 [15,] -3.325096e-04 2.488801e-04 [16,] -3.364681e-04 2.349023e-04 [17,] -3.405219e-04 2.192481e-04 [18,] -3.446746e-04 2.014788e-04 [19,] -3.489299e-04 1.809145e-04 [20,] -3.532915e-04 1.563857e-04 [21,] -3.080266e-04 1.424202e-04 [22,] -2.616011e-04 1.259321e-04 [23,] -2.139697e-04 1.056694e-04 [24,] -1.650849e-04 7.865690e-05 [25,] -1.439335e-04 6.476078e-05 [26,] -1.212615e-04 4.972165e-05 [27,] -1.149859e-04 4.488074e-05 [28,] -9.648325e-05 4.114174e-05 [29,] -9.648325e-05 3.669909e-05 [30,] -5.789194e-05 3.122341e-05 [31,] -3.775735e-05 2.397452e-05 [32,] -2.128204e-05 1.752263e-05 [33,] -4.314939e-06 4.314939e-06 [34,] 7.509145e-15 2.525196e-15 [35,] 7.532436e-15 2.523728e-15 [36,] 7.556455e-15 2.521543e-15 [37,] 7.581237e-15 2.518571e-15 [38,] 7.592493e-15 2.516691e-15 [39,] 7.604118e-15 2.514001e-15 [40,] 7.612429e-15 2.510929e-15 [41,] 7.621022e-15 2.506911e-15 [42,] 7.629912e-15 2.501849e-15 [43,] 7.639114e-15 2.495635e-15 [44,] 7.648644e-15 2.488143e-15 [45,] 7.658520e-15 2.479235e-15 [46,] 7.668763e-15 2.468755e-15 [47,] 7.679392e-15 2.456522e-15 [48,] 7.690429e-15 2.442334e-15 [49,] 7.802038e-15 2.440081e-15 [50,] 7.918111e-15 2.436600e-15 [51,] 8.038921e-15 2.431733e-15 [52,] 8.164765e-15 2.425302e-15 [53,] 8.295964e-15 2.417102e-15 [54,] 8.432868e-15 2.406894e-15 [55,] 8.575856e-15 2.394402e-15 [56,] 8.725344e-15 2.379302e-15 [57,] 8.725344e-15 2.361215e-15 [58,] 8.881784e-15 2.339691e-15 [59,] 9.217559e-15 2.314192e-15 [60,] 9.398038e-15 2.284074e-15 [61,] 9.587772e-15 2.248550e-15 [62,] 9.787492e-15 2.206651e-15 [63,] 9.998008e-15 2.157169e-15 [64,] 9.961168e-15 2.156988e-15 [65,] 9.922222e-15 2.154990e-15 [66,] 9.880985e-15 2.150838e-15 > (midr <- midrange(x)) [1] -1.504352e-14 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 4.425172e-15 4.425172e-15 4.425172e-15 4.425172e-15 4.425172e-15 [6] 4.425172e-15 4.425172e-15 4.425172e-15 > postscript(file="/var/www/rcomp/tmp/1wto81290524557.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/2pk6t1290524557.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/3sofa1290524557.tab") > > try(system("convert tmp/1wto81290524557.ps tmp/1wto81290524557.png",intern=TRUE)) character(0) > try(system("convert tmp/2pk6t1290524557.ps tmp/2pk6t1290524557.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.50 0.53 2.01