R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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. > > RC.capture <- function (expression, collapse = NULL) { + resultConn <- textConnection('RC.resultText', open = 'w', local=TRUE) + sink(resultConn) + on.exit(function() { + sink() + close(resultConn) + }) + expression + on.exit(NULL) + sink() + close(resultConn) + return(paste(c(RC.resultText, ''), collapse = collapse, sep = '')) + } > RC.texteval <- function (sourceText, collapse = NULL, echo = TRUE) { + sourceConn <- textConnection(sourceText, open = 'r') + on.exit(close(sourceConn)) + result <- RC.capture(source(file = sourceConn, local = FALSE, echo = echo, print.eval = TRUE), collapse = collapse) + on.exit(NULL) + close(sourceConn) + res <- '' + for(i in 1:length(result)) { + if (result[i]!='') res <- paste(res,result[i],' + ',sep='') + } + return(res) + } > x <- c(-14.81039 + ,-3.28274 + ,-4.85329 + ,-25.62907 + ,-2.05413 + ,-0.96706 + ,9.96965 + ,-6.81537 + ,-3.85900 + ,7.68954 + ,-39.33000 + ,-15.16607 + ,-0.13154 + ,1.55439 + ,-1.21081 + ,2.59094 + ,4.25931 + ,-0.34667 + ,-21.90876 + ,-4.51886 + ,18.64956 + ,-8.09796 + ,27.19089 + ,-4.93466 + ,5.54314 + ,14.67181 + ,4.35485 + ,-35.36298 + ,21.09116 + ,8.54014 + ,-21.07678 + ,0.70893 + ,3.25688 + ,-13.23521 + ,-8.35929 + ,-4.65221 + ,-5.06926 + ,-30.82941 + ,7.17970 + ,1.29943 + ,-3.55868 + ,-1.94040 + ,-5.68342 + ,10.24959 + ,10.51949 + ,-5.62233 + ,17.90070 + ,22.44965 + ,9.43289 + ,32.61133 + ,-6.81711 + ,-0.65314 + ,4.75309 + ,-13.44323 + ,-4.80908 + ,-0.04435 + ,7.05527 + ,2.01473 + ,2.62446 + ,-0.63780 + ,-10.64846 + ,-11.45022 + ,6.12018 + ,-8.18714 + ,-4.23073 + ,39.26613 + ,4.87331 + ,-15.42067 + ,34.03244 + ,3.53316 + ,26.54658 + ,2.94135 + ,-3.46076 + ,-0.05704 + ,7.35246 + ,-7.07442 + ,-6.55026 + ,-22.66062 + ,7.13510 + ,0.38424 + ,-4.83275 + ,-2.25130 + ,-31.85808 + ,10.77965 + ,-31.82712 + ,6.39089 + ,0.01278 + ,-2.19794 + ,14.51179 + ,3.65711 + ,10.82303 + ,9.07264 + ,-11.37350 + ,10.46728 + ,-14.97325 + ,30.67256 + ,-18.92760 + ,15.30698 + ,-34.03504 + ,-7.24521 + ,10.61113 + ,0.77871 + ,-0.10387 + ,-16.26651 + ,-11.33622 + ,2.84565 + ,3.50492 + ,6.10891 + ,34.72095 + ,4.36559 + ,39.31253 + ,2.45698 + ,36.57613 + ,-4.15898 + ,-1.42988 + ,-13.17862 + ,0.68764 + ,0.64259 + ,9.81365 + ,0.58821 + ,9.06359 + ,-21.45345 + ,8.82159 + ,-14.05202 + ,-17.35022 + ,-9.66790 + ,3.34815 + ,1.07363 + ,-1.42596 + ,-21.61176 + ,4.76899 + ,-7.45835 + ,17.52726 + ,-12.23760 + ,-0.31758 + ,-15.25193 + ,-19.92141 + ,-6.64785 + ,-12.81371 + ,0.64526 + ,6.08556 + ,5.70685 + ,2.45812 + ,-4.70240 + ,-10.01302 + ,15.30227 + ,6.66024 + ,-27.41800 + ,-6.75046 + ,-5.71698 + ,28.08686 + ,5.69599 + ,2.03406 + ,13.22204 + ,8.88650 + ,18.84657 + ,25.04196 + ,10.71160 + ,1.13755 + ,7.45398 + ,-1.49701 + ,12.55633 + ,-14.74332 + ,-1.99871 + ,-10.90802 + ,4.10447 + ,-1.50770 + ,-47.28901 + ,13.63685 + ,10.28751 + ,-2.36258 + ,-23.95407 + ,60.80184 + ,4.20974 + ,-1.68746 + ,29.84660 + ,32.39293 + ,7.24087 + ,-5.94028 + ,6.67141 + ,16.13431 + ,6.33344 + ,-18.60496 + ,-19.82071 + ,16.01946 + ,28.64296 + ,60.62326 + ,-17.61620 + ,-21.91786 + ,3.66145 + ,-9.01293 + ,1.02439 + ,-14.67385 + ,-5.32970 + ,-2.78519 + ,3.96277 + ,-6.08144 + ,-40.03321 + ,31.72985 + ,-15.47080 + ,-1.91390 + ,-35.43998 + ,-8.19525 + ,-30.12629 + ,69.17736 + ,-16.80747 + ,-8.38222 + ,-0.33511 + ,-12.91487 + ,-3.86879 + ,-2.06974 + ,-5.61551 + ,11.97373 + ,-8.03816 + ,-6.42337 + ,-8.63532 + ,-4.51673 + ,4.60513 + ,1.38954 + ,5.13314 + ,-5.77963 + ,11.59462 + ,-3.09008 + ,9.48020 + ,-5.30047 + ,6.13748 + ,-21.69430 + ,0.09540 + ,-3.44514 + ,10.83315 + ,2.85724 + ,15.20208 + ,-8.97473 + ,1.11793 + ,-0.96618 + ,-6.49897 + ,-4.79496 + ,-1.66741 + ,-10.54649 + ,-3.67153 + ,-13.90539) > library(moments) > agostino <- agostino.test(x) > anscombe <- anscombe.test(x) > geary <- geary(x) > jarque <- jarque.test(x) > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Skewness and Kurtosis Test',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('agostino'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('anscombe'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('jarque'),'
',sep='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste('
',RC.texteval('geary'),'
',sep='')) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1f8k61355078068.tab") > > > > proc.time() user system elapsed 0.410 0.071 0.459