R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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.2862601528905E-14 + ,0.073315265017433 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-0.07331526501745 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,0.073315265017433 + ,-0.07331526501745 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,3.2862601528905E-14 + ,0.073315265017433 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-4.9737991503207E-14 + ,-0.03293710907405 + ,3.5527136788005E-14 + ,3.5527136788005E-14 + ,0.071931219008635 + ,-0.0085349024497958 + ,0.0085349024498416 + ,-0.0085349024497958 + ,4.1744385725906E-14 + ,-0.063396316558758 + ,3.5527136788005E-14 + ,3.5527136788005E-14 + ,3.5527136788005E-14 + ,3.5527136788005E-14 + ,0.071931219008635 + ,0.036848103398004 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.067774696162676 + ,4.2632564145606E-14 + ,4.2632564145606E-14 + ,0.036576325306843 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.031198370855877 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,0.031198370855885 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.045383005847776 + ,0.014184634991941 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,0.031198370855885 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,0.031198370855885 + ,2.3536728122053E-14 + ,-0.031198370855877 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-14 + ,-1.5099033134902E-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.0005897955 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.001535838 > (armose <- arm / armse) [1] 0.3840220 > (geo <- geomean(x)) [1] NaN Warning message: In log(x) : NaNs produced > (har <- harmean(x)) [1] -1.640746e-13 > (qua <- quamean(x)) [1] 0.02167368 > (win <- winmean(x)) [,1] [,2] [1,] 5.897955e-04 1.535838e-03 [2,] 6.452012e-04 1.522883e-03 [3,] 6.901162e-04 1.503472e-03 [4,] 1.050382e-03 1.435390e-03 [5,] 4.844520e-04 1.209468e-03 [6,] 5.284608e-04 1.201154e-03 [7,] 3.402324e-04 1.174515e-03 [8,] 3.402324e-04 1.174515e-03 [9,] 3.402324e-04 1.174515e-03 [10,] 3.402324e-04 1.174515e-03 [11,] 3.402324e-04 1.174515e-03 [12,] 3.402324e-04 1.174515e-03 [13,] 3.402324e-04 1.174515e-03 [14,] 3.402324e-04 1.174515e-03 [15,] 3.402324e-04 1.174515e-03 [16,] 3.402324e-04 1.174515e-03 [17,] 3.402324e-04 1.174515e-03 [18,] 3.402324e-04 1.174515e-03 [19,] 3.402324e-04 1.174515e-03 [20,] 3.402324e-04 1.174515e-03 [21,] 3.402324e-04 1.174515e-03 [22,] 3.402324e-04 1.174515e-03 [23,] 3.402324e-04 1.174515e-03 [24,] 3.402324e-04 1.174515e-03 [25,] 3.402324e-04 1.174515e-03 [26,] 3.402324e-04 1.174515e-03 [27,] 3.399801e-03 8.432651e-04 [28,] 3.399801e-03 8.432651e-04 [29,] 2.170370e-03 3.603063e-04 [30,] 1.322910e-03 2.189607e-04 [31,] 1.412204e-15 2.401428e-15 [32,] 1.412204e-15 2.401428e-15 [33,] 1.265654e-15 2.388868e-15 [34,] 2.087219e-16 2.303067e-15 [35,] 2.087219e-16 2.303067e-15 [36,] 2.087219e-16 2.303067e-15 [37,] 2.087219e-16 2.303067e-15 [38,] 2.087219e-16 2.303067e-15 [39,] 2.087219e-16 2.303067e-15 [40,] -3.241851e-16 2.262889e-15 [41,] -3.241851e-16 2.262889e-15 [42,] -3.241851e-16 2.262889e-15 [43,] 7.123191e-15 1.561973e-15 [44,] 7.123191e-15 1.561973e-15 [45,] 7.123191e-15 1.561973e-15 [46,] 7.123191e-15 1.561973e-15 [47,] 7.123191e-15 1.561973e-15 [48,] 7.123191e-15 1.561973e-15 [49,] 7.123191e-15 1.561973e-15 [50,] 7.123191e-15 1.561973e-15 [51,] 7.123191e-15 1.561973e-15 [52,] 7.123191e-15 1.561973e-15 [53,] 7.123191e-15 1.561973e-15 [54,] 4.605205e-15 1.369134e-15 [55,] 4.605205e-15 1.369134e-15 [56,] 4.605205e-15 1.369134e-15 [57,] 4.605205e-15 1.369134e-15 [58,] 4.605205e-15 1.369134e-15 [59,] 4.605205e-15 1.369134e-15 [60,] 4.605205e-15 1.369134e-15 [61,] 4.605205e-15 1.369134e-15 [62,] 4.605205e-15 1.369134e-15 [63,] 4.605205e-15 1.369134e-15 [64,] 4.605205e-15 1.369134e-15 [65,] 4.605205e-15 1.369134e-15 [66,] 4.605205e-15 1.369134e-15 > (tri <- trimean(x)) [,1] [,2] [1,] 5.957531e-04 1.459859e-03 [2,] 6.018322e-04 1.376127e-03 [3,] 5.794770e-04 1.291120e-03 [4,] 5.410606e-04 1.204803e-03 [5,] 4.070285e-04 1.132078e-03 [6,] 3.905555e-04 1.113412e-03 [7,] 3.658413e-04 1.095220e-03 [8,] 3.698178e-04 1.080730e-03 [9,] 3.738817e-04 1.065250e-03 [10,] 3.780360e-04 1.048693e-03 [11,] 3.822836e-04 1.030963e-03 [12,] 3.866277e-04 1.011946e-03 [13,] 3.910717e-04 9.915140e-04 [14,] 3.956190e-04 9.695186e-04 [15,] 4.002734e-04 9.457858e-04 [16,] 4.050385e-04 9.201104e-04 [17,] 4.099185e-04 8.922466e-04 [18,] 4.149175e-04 8.618962e-04 [19,] 4.200400e-04 8.286907e-04 [20,] 4.252905e-04 7.921641e-04 [21,] 4.306739e-04 7.517125e-04 [22,] 4.361953e-04 7.065251e-04 [23,] 4.418602e-04 6.554653e-04 [24,] 4.476742e-04 5.968424e-04 [25,] 4.536432e-04 5.279185e-04 [26,] 4.597735e-04 4.436331e-04 [27,] 4.660717e-04 3.320895e-04 [28,] 3.151598e-04 2.518317e-04 [29,] 3.151598e-04 1.162145e-04 [30,] 6.096359e-05 6.096359e-05 [31,] 3.642819e-15 2.242269e-15 [32,] 3.748635e-15 2.222432e-15 [33,] 3.857611e-15 2.200650e-15 [34,] 3.976617e-15 2.177627e-15 [35,] 4.147110e-15 2.158247e-15 [36,] 4.322931e-15 2.136792e-15 [37,] 4.504333e-15 2.113036e-15 [38,] 4.691588e-15 2.086723e-15 [39,] 4.884981e-15 2.057557e-15 [40,] 5.084821e-15 2.025194e-15 [41,] 5.314017e-15 1.992031e-15 [42,] 5.551115e-15 1.955054e-15 [43,] 5.796533e-15 1.913738e-15 [44,] 5.741439e-15 1.923769e-15 [45,] 5.684342e-15 1.933834e-15 [46,] 5.625130e-15 1.943922e-15 [47,] 5.563684e-15 1.954018e-15 [48,] 5.499874e-15 1.964106e-15 [49,] 5.433562e-15 1.974167e-15 [50,] 5.364598e-15 1.984178e-15 [51,] 5.292818e-15 1.994114e-15 [52,] 5.218048e-15 2.003945e-15 [53,] 5.140096e-15 2.013637e-15 [54,] 5.058755e-15 2.023149e-15 [55,] 5.077420e-15 2.045668e-15 [56,] 5.096933e-15 2.068954e-15 [57,] 5.096933e-15 2.093051e-15 [58,] 5.117354e-15 2.118007e-15 [59,] 5.161183e-15 2.143876e-15 [60,] 5.184742e-15 2.170713e-15 [61,] 5.209508e-15 2.198580e-15 [62,] 5.235578e-15 2.227545e-15 [63,] 5.263057e-15 2.257681e-15 [64,] 5.292063e-15 2.289070e-15 [65,] 5.322726e-15 2.321800e-15 [66,] 5.355193e-15 2.355968e-15 > (midr <- midrange(x)) [1] -8.500145e-15 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 6.490535e-15 6.490535e-15 6.490535e-15 6.490535e-15 6.490535e-15 [6] 6.490535e-15 6.490535e-15 6.490535e-15 > postscript(file="/var/www/html/freestat/rcomp/tmp/1lzm01290534770.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/freestat/rcomp/tmp/2e8l31290534770.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3ybu21290534770.tab") > > try(system("convert tmp/1lzm01290534770.ps tmp/1lzm01290534770.png",intern=TRUE)) character(0) > try(system("convert tmp/2e8l31290534770.ps tmp/2e8l31290534770.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.472 0.542 4.453