R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(31.82 + ,32.23 + ,30.51 + ,30.68 + ,31.32 + ,30.77 + ,30.88 + ,31.92 + ,29.68 + ,28.56 + ,32.85 + ,36.35 + ,35.13 + ,30.05 + ,30.80 + ,32.00 + ,31.78 + ,29.92 + ,31.77 + ,29.93 + ,31.05 + ,32.25 + ,33.34 + ,35.35 + ,33.45 + ,32.48 + ,31.55 + ,32.02 + ,29.49 + ,27.18 + ,28.66 + ,30.05 + ,31.14 + ,29.66 + ,30.05 + ,26.32 + ,25.32 + ,23.06 + ,24.45 + ,24.91 + ,26.65 + ,28.20 + ,30.50 + ,26.90 + ,28.00 + ,26.12 + ,29.80 + ,32.23 + ,31.64 + ,29.66 + ,31.30 + ,33.42 + ,35.65 + ,35.87 + ,34.73 + ,34.40 + ,33.56 + ,34.36 + ,33.45 + ,32.98 + ,32.72 + ,32.75 + ,34.21 + ,36.69 + ,37.50 + ,37.52 + ,37.23 + ,35.72 + ,35.61 + ,39.34 + ,39.31 + ,40.62 + ,40.62 + ,41.80 + ,42.60 + ,43.67 + ,45.47 + ,46.40 + ,45.84 + ,46.59 + ,46.70 + ,48.81 + ,48.92 + ,46.95 + ,44.90 + ,43.63 + ,45.28 + ,46.05 + ,46.51 + ,46.95 + ,46.45 + ,49.82 + ,51.82 + ,52.50 + ,53.25 + ,53.95 + ,54.54 + ,53.23 + ,52.00 + ,51.13 + ,50.16 + ,50.19 + ,51.28 + ,53.34 + ,53.08 + ,51.75 + ,52.20 + ,51.11 + ,51.30 + ,52.61 + ,51.41 + ,51.61 + ,52.35 + ,52.21 + ,52.64 + ,52.50 + ,53.55 + ,52.41 + ,53.80 + ,54.22 + ,53.21 + ,53.50 + ,52.30 + ,52.47 + ,51.32 + ,51.37 + ,52.32 + ,52.24 + ,53.40 + ,52.83 + ,53.08 + ,53.62 + ,54.14 + ,54.62 + ,54.13 + ,52.94 + ,54.43 + ,53.98 + ,54.05 + ,53.45 + ,53.39 + ,53.43 + ,53.03 + ,52.16 + ,51.72 + ,51.42 + ,50.54 + ,50.13 + ,50.63 + ,52.10 + ,52.64 + ,53.47 + ,53.39 + ,54.11 + ,54.70 + ,54.34 + ,53.39 + ,52.47 + ,52.74 + ,53.44 + ,51.61 + ,53.30 + ,53.10 + ,53.26 + ,53.09 + ,53.39 + ,52.56 + ,52.57 + ,53.18 + ,52.00 + ,51.75 + ,50.34 + ,51.96 + ,53.07 + ,53.14 + ,52.60 + ,52.70 + ,53.20 + ,52.23 + ,53.21 + ,54.17 + ,54.33 + ,55.12 + ,56.58 + ,55.91 + ,54.65 + ,55.03 + ,55.56 + ,57.15 + ,58.24 + ,58.77 + ,58.97 + ,57.29 + ,56.04 + ,56.72 + ,56.46 + ,57.10 + ,56.81 + ,56.32 + ,55.81 + ,56.03 + ,56.90 + ,56.59 + ,54.60 + ,55.08 + ,55.48 + ,54.42 + ,54.55 + ,55.17 + ,55.10 + ,53.89 + ,53.02 + ,53.24 + ,52.32 + ,52.57 + ,51.69 + ,50.26 + ,47.94 + ,47.32 + ,48.72 + ,49.84 + ,50.15 + ,50.00 + ,49.34) > ylimmax = '' > ylimmin = '' > main = 'Robustness of Central Tendency' > 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] 45.66795 > sqrtn <- sqrt(length(x)) > (armse <- sd(x) / sqrtn) [1] 0.678138 > (armose <- arm / armse) [1] 67.34314 > (geo <- geomean(x)) [1] 44.37953 > (har <- harmean(x)) [1] 42.94427 > (qua <- quamean(x)) [1] 46.77727 > (win <- winmean(x)) [,1] [,2] [1,] 45.67326 0.6771601 [2,] 45.67263 0.6761863 [3,] 45.66540 0.6744149 [4,] 45.67719 0.6723245 [5,] 45.68054 0.6716596 [6,] 45.68402 0.6701201 [7,] 45.68902 0.6689202 [8,] 45.69580 0.6674295 [9,] 45.72353 0.6630198 [10,] 45.73201 0.6619216 [11,] 45.74379 0.6594075 [12,] 45.74165 0.6582393 [13,] 45.77357 0.6515772 [14,] 45.78357 0.6503471 [15,] 45.77554 0.6497822 [16,] 45.76982 0.6491258 [17,] 45.75996 0.6468133 [18,] 45.76317 0.6453136 [19,] 45.73772 0.6434682 [20,] 45.74397 0.6419978 [21,] 45.74210 0.6418751 [22,] 45.74013 0.6417468 [23,] 45.78121 0.6363912 [24,] 45.74692 0.6340041 [25,] 45.76031 0.6316133 [26,] 45.76728 0.6302771 [27,] 45.76848 0.6297398 [28,] 45.77223 0.6282831 [29,] 45.79295 0.6258698 [30,] 45.79027 0.6236791 [31,] 45.81103 0.6212673 [32,] 45.80246 0.6202603 [33,] 45.83487 0.6166354 [34,] 45.83183 0.6141911 [35,] 45.84433 0.6116130 [36,] 45.84112 0.6111532 [37,] 45.84607 0.6103714 [38,] 45.85964 0.6084194 [39,] 45.86313 0.6063560 [40,] 45.85420 0.6052352 [41,] 45.88714 0.6009763 [42,] 45.87589 0.6003011 [43,] 45.86246 0.5988792 [44,] 45.87228 0.5921979 [45,] 45.90643 0.5864991 [46,] 45.90232 0.5852793 [47,] 45.91701 0.5828012 [48,] 45.94058 0.5797554 [49,] 46.01714 0.5717659 [50,] 46.03277 0.5698620 [51,] 46.03277 0.5687871 [52,] 46.03045 0.5686523 [53,] 46.05647 0.5660730 [54,] 46.21317 0.5506572 [55,] 46.25000 0.5470624 [56,] 46.24750 0.5453577 [57,] 46.32129 0.5366065 [58,] 46.41451 0.5260038 [59,] 46.46982 0.5202857 [60,] 46.53679 0.5134687 [61,] 46.54496 0.5122702 [62,] 46.55879 0.5100994 [63,] 46.60098 0.5060838 [64,] 46.73527 0.4929168 [65,] 46.82812 0.4832736 [66,] 46.97545 0.4676593 [67,] 47.04424 0.4594169 [68,] 47.04728 0.4586719 [69,] 47.59558 0.4076483 [70,] 47.60496 0.4067940 [71,] 48.00750 0.3699382 [72,] 47.99464 0.3691505 [73,] 48.37594 0.3347738 [74,] 48.61379 0.3099836 > (tri <- trimean(x)) [,1] [,2] [1,] 45.70986 0.6739296 [2,] 45.74714 0.6704982 [3,] 45.78541 0.6673752 [4,] 45.82690 0.6646941 [5,] 45.86607 0.6624158 [6,] 45.90528 0.6601237 [7,] 45.94462 0.6579619 [8,] 45.98394 0.6558400 [9,] 46.02311 0.6537809 [10,] 46.05966 0.6521698 [11,] 46.09599 0.6505553 [12,] 46.13185 0.6490907 [13,] 46.16864 0.6476118 [14,] 46.20337 0.6466777 [15,] 46.23799 0.6457452 [16,] 46.27396 0.6447405 [17,] 46.31111 0.6436641 [18,] 46.34973 0.6426457 [19,] 46.38898 0.6416162 [20,] 46.43071 0.6405853 [21,] 46.47297 0.6395276 [22,] 46.51628 0.6383331 [23,] 46.56067 0.6369918 [24,] 46.60381 0.6358813 [25,] 46.64977 0.6347651 [26,] 46.69610 0.6336557 [27,] 46.74318 0.6324744 [28,] 46.79131 0.6311575 [29,] 46.84042 0.6297544 [30,] 46.88976 0.6283252 [31,] 46.94043 0.6268373 [32,] 46.99144 0.6253077 [33,] 47.04411 0.6236249 [34,] 47.09673 0.6219606 [35,] 47.15084 0.6202168 [36,] 47.20586 0.6183999 [37,] 47.26247 0.6163597 [38,] 47.32041 0.6141008 [39,] 47.37938 0.6116813 [40,] 47.43986 0.6090841 [41,] 47.50239 0.6062221 [42,] 47.56543 0.6032975 [43,] 47.63072 0.6000393 [44,] 47.69846 0.5964584 [45,] 47.76784 0.5928770 [46,] 47.83803 0.5892459 [47,] 47.91054 0.5852275 [48,] 47.98477 0.5808811 [49,] 48.06048 0.5762171 [50,] 48.13581 0.5715910 [51,] 48.21303 0.5665186 [52,] 48.29283 0.5608710 [53,] 48.37542 0.5545078 [54,] 48.45991 0.5475571 [55,] 48.54167 0.5410817 [56,] 48.62500 0.5340747 [57,] 48.71145 0.5262617 [58,] 48.79843 0.5182123 [59,] 48.88528 0.5100749 [60,] 48.97346 0.5013704 [61,] 48.97346 0.4921341 [62,] 49.15510 0.4816829 [63,] 49.25082 0.4699178 [64,] 49.34896 0.4568550 [65,] 49.44628 0.4434120 [66,] 49.54435 0.4290643 [67,] 49.64122 0.4144452 [68,] 49.73989 0.3984701 [69,] 49.84302 0.3797442 [70,] 49.92988 0.3656366 [71,] 50.02061 0.3490736 [72,] 50.10000 0.3354501 [73,] 50.18397 0.3192575 [74,] 50.25697 0.3059138 > (midr <- midrange(x)) [1] 41.015 > midm <- array(NA,dim=8) > for (j in 1:8) midm[j] <- midmean(x,j) > midm [1] 48.49876 48.62500 48.49876 48.62500 48.62500 48.49876 48.62500 48.66598 > postscript(file="/var/www/rcomp/tmp/1no7e1321367323.ps",horizontal=F,onefile=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/2ejuz1321367323.ps",horizontal=F,onefile=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/3zs921321367324.tab") > > try(system("convert tmp/1no7e1321367323.ps tmp/1no7e1321367323.png",intern=TRUE)) character(0) > try(system("convert tmp/2ejuz1321367323.ps tmp/2ejuz1321367323.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.420 0.070 1.491