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(-3.8635761256955E-14 + ,-3.8635761256955E-14 + ,-3.8635761256955E-14 + ,-3.8635761256955E-14 + ,-3.8635761256955E-14 + ,-3.8635761256955E-14 + ,-0.024154942035039 + ,0.024154942035005 + ,-3.8635761256955E-14 + ,-0.024154942035039 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,4.8849813083507E-15 + ,0.024154942035005 + ,-3.8635761256955E-14 + ,-3.8635761256955E-14 + ,-0.010814569746239 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,0.024170360927819 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,0.024170360927819 + ,-0.024170360927795 + ,0.024170360927819 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,1.8651746813703E-14 + ,0.024170360927819 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,5.7731597280508E-15 + ,-0.024170360927795 + ,0.024170360927819 + ,-0.00066357003099426 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,0.02393949379279 + ,-1.4654943925052E-14 + ,-0.023939493792815 + ,0.02393949379279 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-0.023939493792815 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,0.02393949379279 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-0.023939493792815 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,-9.7699626167014E-15 + ,0.02393949379279 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-14 + ,-1.4654943925052E-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.0001831586 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.00080412 > (armose <- arm / armse) [1] 0.2277752 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] 1.738173e-14 > (qua <- quamean(x)) [1] 0.01134499 > (win <- winmean(x)) [,1] [,2] [1,] 1.831586e-04 8.041200e-04 [2,] 1.831586e-04 8.041200e-04 [3,] 1.831586e-04 8.041200e-04 [4,] 1.831586e-04 8.041200e-04 [5,] 1.831586e-04 8.041200e-04 [6,] 1.831586e-04 8.041200e-04 [7,] 1.831586e-04 8.041200e-04 [8,] 1.831586e-04 8.041200e-04 [9,] 1.831586e-04 8.041200e-04 [10,] 1.831586e-04 8.041200e-04 [11,] 1.831586e-04 8.041200e-04 [12,] 1.831586e-04 8.041200e-04 [13,] 1.831586e-04 8.041200e-04 [14,] 1.831586e-04 8.041200e-04 [15,] 1.831586e-04 8.041200e-04 [16,] 1.843921e-04 8.039323e-04 [17,] 1.830815e-04 8.037358e-04 [18,] 2.024718e-04 8.007918e-04 [19,] 1.820042e-04 7.977220e-04 [20,] 1.820042e-04 7.977220e-04 [21,] 1.560121e-03 6.193679e-04 [22,] 2.676731e-03 5.435421e-04 [23,] 3.774758e-16 1.418341e-15 [24,] 3.774758e-16 1.418341e-15 [25,] 3.774758e-16 1.418341e-15 [26,] 3.774758e-16 1.418341e-15 [27,] 3.774758e-16 1.418341e-15 [28,] 3.774758e-16 1.418341e-15 [29,] 3.774758e-16 1.418341e-15 [30,] 3.774758e-16 1.418341e-15 [31,] 3.774758e-16 1.418341e-15 [32,] 4.214407e-15 9.463902e-16 [33,] 4.214407e-15 9.463902e-16 [34,] 4.214407e-15 9.463902e-16 [35,] 4.214407e-15 9.463902e-16 [36,] 4.214407e-15 9.463902e-16 [37,] 4.214407e-15 9.463902e-16 [38,] 4.214407e-15 9.463902e-16 [39,] 4.214407e-15 9.463902e-16 [40,] 4.214407e-15 9.463902e-16 [41,] 4.214407e-15 9.463902e-16 [42,] 4.214407e-15 9.463902e-16 [43,] 4.214407e-15 9.463902e-16 [44,] 4.214407e-15 9.463902e-16 [45,] 4.214407e-15 9.463902e-16 [46,] 4.214407e-15 9.463902e-16 [47,] 4.214407e-15 9.463902e-16 [48,] 4.214407e-15 9.463902e-16 [49,] 4.214407e-15 9.463902e-16 [50,] 4.214407e-15 9.463902e-16 [51,] 5.460077e-15 8.259565e-16 [52,] 5.460077e-15 8.259565e-16 [53,] 5.460077e-15 8.259565e-16 [54,] 5.460077e-15 8.259565e-16 [55,] 5.460077e-15 8.259565e-16 [56,] 5.460077e-15 8.259565e-16 [57,] 5.460077e-15 8.259565e-16 [58,] 5.460077e-15 8.259565e-16 [59,] 5.460077e-15 8.259565e-16 [60,] 5.460077e-15 8.259565e-16 [61,] 5.460077e-15 8.259565e-16 [62,] 5.460077e-15 8.259565e-16 [63,] 1.007638e-14 4.565930e-16 [64,] 1.007638e-14 4.565930e-16 [65,] 1.007638e-14 4.565930e-16 [66,] 1.007638e-14 4.565930e-16 > (tri <- trimean(x)) [,1] [,2] [1,] 1.850087e-04 7.936087e-04 [2,] 1.868965e-04 7.824286e-04 [3,] 1.888233e-04 7.705241e-04 [4,] 1.907902e-04 7.578326e-04 [5,] 1.927985e-04 7.442833e-04 [6,] 1.948495e-04 7.297954e-04 [7,] 1.969447e-04 7.142759e-04 [8,] 1.990854e-04 6.976173e-04 [9,] 2.012732e-04 6.796936e-04 [10,] 2.035095e-04 6.603557e-04 [11,] 2.057962e-04 6.394247e-04 [12,] 2.081347e-04 6.166828e-04 [13,] 2.105271e-04 5.918597e-04 [14,] 2.129751e-04 5.646123e-04 [15,] 2.154807e-04 5.344929e-04 [16,] 2.180459e-04 5.008958e-04 [17,] 2.205801e-04 4.629933e-04 [18,] 2.232701e-04 4.195032e-04 [19,] 2.246966e-04 3.688161e-04 [20,] 2.275053e-04 3.072443e-04 [21,] 2.303851e-04 2.249466e-04 [22,] 1.492046e-04 1.535447e-04 [23,] 3.474854e-15 1.234364e-15 [24,] 3.652049e-15 1.215172e-15 [25,] 3.833970e-15 1.194201e-15 [26,] 4.020808e-15 1.171247e-15 [27,] 4.212764e-15 1.146069e-15 [28,] 4.410053e-15 1.118385e-15 [29,] 4.410053e-15 1.087854e-15 [30,] 4.821540e-15 1.054061e-15 [31,] 5.036229e-15 1.016493e-15 [32,] 5.257233e-15 9.744975e-16 [33,] 5.305872e-15 9.726153e-16 [34,] 5.355985e-15 9.703679e-16 [35,] 5.407640e-15 9.677207e-16 [36,] 5.460910e-15 9.646352e-16 [37,] 5.515870e-15 9.610683e-16 [38,] 5.572603e-15 9.569720e-16 [39,] 5.631197e-15 9.522922e-16 [40,] 5.691743e-15 9.469682e-16 [41,] 5.754342e-15 9.409311e-16 [42,] 5.819100e-15 9.341029e-16 [43,] 5.886130e-15 9.263944e-16 [44,] 5.955554e-15 9.177036e-16 [45,] 6.027502e-15 9.079128e-16 [46,] 6.102115e-15 8.968855e-16 [47,] 6.179543e-15 8.844623e-16 [48,] 6.259950e-15 8.704552e-16 [49,] 6.343510e-15 8.546411e-16 [50,] 6.430412e-15 8.367515e-16 [51,] 6.520861e-15 8.164597e-16 [52,] 6.564194e-15 8.059558e-16 [53,] 6.609370e-15 7.939751e-16 [54,] 6.656511e-15 7.802982e-16 [55,] 6.705747e-15 7.646600e-16 [56,] 6.757221e-15 7.467360e-16 [57,] 6.757221e-15 7.261220e-16 [58,] 6.811089e-15 7.023055e-16 [59,] 6.926709e-15 6.746205e-16 [60,] 6.988854e-15 6.421748e-16 [61,] 7.054186e-15 6.037238e-16 [62,] 7.122957e-15 5.574325e-16 [63,] 7.195445e-15 5.003690e-16 [64,] 7.068420e-15 4.874696e-16 [65,] 6.934136e-15 4.716703e-16 [66,] 6.791953e-15 4.522085e-16 > (midr <- midrange(x)) [1] 1.200082e-14 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 6.088616e-15 6.088616e-15 6.088616e-15 6.088616e-15 6.088616e-15 [6] 6.088616e-15 6.088616e-15 6.088616e-15 > postscript(file="/var/www/html/rcomp/tmp/1bw2v1290437751.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/2bw2v1290437751.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/3o8ax1290437751.tab") > > try(system("convert tmp/1bw2v1290437751.ps tmp/1bw2v1290437751.png",intern=TRUE)) character(0) > try(system("convert tmp/2bw2v1290437751.ps tmp/2bw2v1290437751.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.026 0.356 2.882