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.0077760889499117 + ,3.5527136788005E-15 + ,-0.0077760889498966 + ,1.1546319456102E-14 + ,-0.024497471600388 + ,0.0322735605503 + ,-0.0077760889498966 + ,1.1546319456102E-14 + ,0.0077760889499117 + ,3.5527136788005E-15 + ,3.5527136788005E-15 + ,3.5527136788005E-15 + ,3.5527136788005E-15 + ,-0.0077760889498966 + ,1.1546319456102E-14 + ,1.1546319456102E-14 + ,1.1546319456102E-14 + ,0.0077760889499117 + ,3.5527136788005E-15 + ,0.0023210842142034 + ,0 + ,-0.0077579908108998 + ,3.9523939676656E-14 + ,3.9523939676656E-14 + ,0.0077579908109393 + ,0 + ,0 + ,0 + ,0 + ,-0.0077579908108998 + ,3.9523939676656E-14 + ,3.9523939676656E-14 + ,3.9523939676656E-14 + ,3.9523939676656E-14 + ,3.9523939676656E-14 + ,3.9523939676656E-14 + ,-0.00038948393876082 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-0.007036776495049 + ,-2.3980817331903E-14 + ,0.0070367764949757 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-0.007036776495049 + ,0.0070367764949757 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-0.007036776495049 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,0.0070367764949757 + ,-0.007036776495049 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,0.0070367764949757 + ,-0.007036776495049 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,-2.3980817331903E-14 + ,0.0070367764949757 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-0.007036776495049 + ,-2.3980817331903E-14 + ,0.0070367764949757 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-4.9293902293357E-14 + ,-0.011361532596849 + ,0.0070671672230582 + ,-0.0070671672231342 + ,0.0070671672230582 + ,-0.0070671672231342 + ,-4.1744385725906E-14 + ,-4.1744385725906E-14 + ,0.00039393343035821 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,0.0071146545167715 + ,-0.0071146545167871 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,1.2878587085652E-14 + ,-0.0071146545167871 + ,0.0071146545167715 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.0071146545167715 + ,-0.0071146545167871 + ,-2.8421709430404E-14 + ,-2.8421709430404E-14 + ,0.015351610285672 + ,-1.1631508098057 + ,1.1241175790765 + ,-7.5495165674511E-15 + ,-7.5495165674511E-15 + ,-7.5495165674511E-15 + ,-7.5495165674511E-15 + ,-7.5495165674511E-15 + ,0.015316704111893 + ,-4.4408920985006E-16 + ,-4.4408920985006E-16 + ,-0.015316704111901 + ,0.015316704111893 + ,-4.4408920985006E-16 + ,-4.4408920985006E-16 + ,-0.015316704111901 + ,-7.5495165674511E-15 + ,-7.5495165674511E-15 + ,-7.5495165674511E-15 + ,0.015316704111893 + ,-4.4408920985006E-16 + ,-0.015316704111901 + ,0.015316704111893 + ,-0.015316704111901 + ,-7.5495165674511E-15) > 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.0001990709 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.008118228 > (armose <- arm / armse) [1] -0.02452147 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] 0 > (qua <- quamean(x)) [1] 0.1145219 > (win <- winmean(x)) [,1] [,2] [1,] 3.497572e-05 4.520537e-04 [2,] -4.243611e-05 3.814231e-04 [3,] -4.295970e-05 3.813170e-04 [4,] -4.295970e-05 3.813170e-04 [5,] -4.295970e-05 3.813170e-04 [6,] 7.569544e-05 3.598278e-04 [7,] -6.273556e-05 2.946017e-04 [8,] -6.273556e-05 2.946017e-04 [9,] -6.273556e-05 2.946017e-04 [10,] -6.273556e-05 2.943619e-04 [11,] -9.811905e-05 2.897859e-04 [12,] -5.951888e-05 2.848185e-04 [13,] -5.951888e-05 2.848185e-04 [14,] -5.951888e-05 2.848185e-04 [15,] -5.951888e-05 2.848185e-04 [16,] -5.951888e-05 2.848185e-04 [17,] -5.951888e-05 2.848185e-04 [18,] -5.951888e-05 2.848185e-04 [19,] -5.951888e-05 2.848185e-04 [20,] -5.951888e-05 2.848185e-04 [21,] -5.951888e-05 2.848185e-04 [22,] -5.951888e-05 2.848185e-04 [23,] -6.497992e-05 2.841285e-04 [24,] -6.497992e-05 2.841285e-04 [25,] -6.284284e-05 2.829100e-04 [26,] -6.284284e-05 2.829100e-04 [27,] -5.874010e-05 2.824001e-04 [28,] -5.874010e-05 2.824001e-04 [29,] -5.874010e-05 2.824001e-04 [30,] -5.874010e-05 2.824001e-04 [31,] -7.896724e-04 2.055770e-04 [32,] -1.098017e-03 1.874304e-04 [33,] -6.621227e-05 1.037114e-05 [34,] -9.592327e-15 2.323880e-15 [35,] -9.592327e-15 2.323880e-15 [36,] -9.592327e-15 2.323880e-15 [37,] -9.592327e-15 2.323880e-15 [38,] -9.592327e-15 2.323880e-15 [39,] -9.592327e-15 2.323880e-15 [40,] -9.592327e-15 2.323880e-15 [41,] -1.505462e-14 1.812597e-15 [42,] -1.505462e-14 1.812597e-15 [43,] -1.505462e-14 1.812597e-15 [44,] -1.505462e-14 1.812597e-15 [45,] -1.505462e-14 1.812597e-15 [46,] -1.505462e-14 1.812597e-15 [47,] -1.505462e-14 1.812597e-15 [48,] -1.505462e-14 1.812597e-15 [49,] -1.505462e-14 1.812597e-15 [50,] -1.505462e-14 1.812597e-15 [51,] -1.312950e-14 1.636293e-15 [52,] -1.312950e-14 1.636293e-15 [53,] -9.598988e-15 1.354936e-15 [54,] -9.598988e-15 1.354936e-15 [55,] -9.598988e-15 1.354936e-15 [56,] -9.598988e-15 1.354936e-15 [57,] -9.598988e-15 1.354936e-15 [58,] -9.598988e-15 1.354936e-15 [59,] -9.598988e-15 1.354936e-15 [60,] -9.598988e-15 1.354936e-15 [61,] -9.598988e-15 1.354936e-15 [62,] -9.598988e-15 1.354936e-15 [63,] -9.598988e-15 1.354936e-15 [64,] -9.598988e-15 1.354936e-15 [65,] -9.598988e-15 1.354936e-15 [66,] -9.598988e-15 1.354936e-15 > (tri <- trimean(x)) [,1] [,2] [1,] -3.944167e-06 4.079582e-04 [2,] -4.365834e-05 3.562144e-04 [3,] -4.428835e-05 3.420015e-04 [4,] -4.474969e-05 3.265368e-04 [5,] -4.522074e-05 3.095523e-04 [6,] -4.570181e-05 2.907427e-04 [7,] -6.745759e-05 2.752846e-04 [8,] -6.819082e-05 2.717548e-04 [9,] -6.894017e-05 2.679847e-04 [10,] -6.970618e-05 2.639533e-04 [11,] -7.048939e-05 2.596716e-04 [12,] -6.763509e-05 2.556950e-04 [13,] -6.841250e-05 2.520566e-04 [14,] -6.920800e-05 2.481545e-04 [15,] -7.002221e-05 2.439640e-04 [16,] -7.085581e-05 2.394567e-04 [17,] -7.170949e-05 2.346003e-04 [18,] -7.258400e-05 2.293568e-04 [19,] -7.348009e-05 2.236820e-04 [20,] -7.439860e-05 2.175233e-04 [21,] -7.534035e-05 2.108178e-04 [22,] -7.630625e-05 2.034883e-04 [23,] -7.729724e-05 1.954391e-04 [24,] -7.800189e-05 1.866278e-04 [25,] -7.872534e-05 1.768288e-04 [26,] -7.958385e-05 1.659823e-04 [27,] -8.046589e-05 1.536689e-04 [28,] -8.158347e-05 1.395244e-04 [29,] -8.158347e-05 1.227779e-04 [30,] -8.391442e-05 1.020784e-04 [31,] -8.513057e-05 7.407051e-05 [32,] -5.170829e-05 5.190252e-05 [33,] -2.906597e-06 2.906597e-06 [34,] -1.201732e-14 2.131291e-15 [35,] -1.212705e-14 2.107708e-15 [36,] -1.224021e-14 2.081756e-15 [37,] -1.235696e-14 2.053174e-15 [38,] -1.247747e-14 2.021662e-15 [39,] -1.260194e-14 1.986870e-15 [40,] -1.273056e-14 1.948386e-15 [41,] -1.286353e-14 1.905723e-15 [42,] -1.277139e-14 1.899845e-15 [43,] -1.267602e-14 1.892892e-15 [44,] -1.257724e-14 1.884744e-15 [45,] -1.247487e-14 1.875269e-15 [46,] -1.236871e-14 1.864313e-15 [47,] -1.225854e-14 1.851703e-15 [48,] -1.214413e-14 1.837238e-15 [49,] -1.202524e-14 1.820686e-15 [50,] -1.190159e-14 1.801777e-15 [51,] -1.177290e-14 1.780198e-15 [52,] -1.171748e-14 1.771461e-15 [53,] -1.165970e-14 1.761076e-15 [54,] -1.174423e-14 1.769998e-15 [55,] -1.183251e-14 1.778757e-15 [56,] -1.192480e-14 1.787308e-15 [57,] -1.192480e-14 1.795599e-15 [58,] -1.202139e-14 1.803566e-15 [59,] -1.222870e-14 1.811138e-15 [60,] -1.234013e-14 1.818229e-15 [61,] -1.245727e-14 1.824737e-15 [62,] -1.258058e-14 1.830543e-15 [63,] -1.271055e-14 1.835501e-15 [64,] -1.284775e-14 1.839442e-15 [65,] -1.299278e-14 1.842158e-15 [66,] -1.314635e-14 1.843400e-15 > (midr <- midrange(x)) [1] -0.01951662 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] -1.490363e-14 -1.490363e-14 -1.490363e-14 -1.490363e-14 -1.490363e-14 [6] -1.490363e-14 -1.490363e-14 -1.490363e-14 > postscript(file="/var/www/rcomp/tmp/1s15k1290523970.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/2lbmn1290523970.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/36ed41290523970.tab") > > try(system("convert tmp/1s15k1290523970.ps tmp/1s15k1290523970.png",intern=TRUE)) character(0) > try(system("convert tmp/2lbmn1290523970.ps tmp/2lbmn1290523970.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.360 0.570 1.906