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(0.00913254578599758 + ,0.00285231361829643 + ,-0.00504471126830556 + ,0.00472883788539909 + ,-0.0228148157690941 + ,0.0146665204163619 + ,-0.00810573403592854 + ,-0.0537902497935497 + ,-0.0511969592456 + ,-0.036629324943988 + ,0.0172327210719726 + ,-0.00406124976408262 + ,0.0267302339734289 + ,0.00605993598803868 + ,-0.0239581305825598 + ,0.0276030625007219 + ,0.0158294581963435 + ,-0.00278529952257839 + ,-0.0323368683613167 + ,0.0519538577563155 + ,-0.0230502843225087 + ,0.0395917857021715 + ,0.0190140226593555 + ,-0.025008220349288 + ,0.0339148272685651 + ,-0.0200956061184338 + ,0.000429046218818689 + ,0.0376056546728016 + ,0.00143910420847144 + ,0.0415186157615298 + ,0.0190919406343806 + ,-0.044450625443882 + ,-0.0361722262778951 + ,0.0415517253286448 + ,0.0061401037776073 + ,0.0386536050903804 + ,0.0120399878680985 + ,-0.00501849326382575 + ,0.028384784122329 + ,0.0298564977321742 + ,-0.0246158805447327 + ,-0.00565133555237002 + ,0.0259374886869223 + ,0.018761649609134 + ,0.0173007305055357 + ,-0.00314632022827562 + ,-0.0494901561831343 + ,0.0173008967948498 + ,0.0146601843263029 + ,0.0156961589027556 + ,-0.018017188877978 + ,-0.00592101599993956 + ,0.0169682530791193 + ,-0.000527171113346208 + ,0.0176361912685677 + ,-0.0196841369078824 + ,0.0413711658477857 + ,0.0175584203326637 + ,-0.00177708604679722 + ,0.00565727906461655 + ,0.0383267373422207 + ,0.0284252431837836 + ,0.0174866265834957 + ,-0.0485917340232007) > 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/1447e1355865228.tab") > > > > proc.time() user system elapsed 0.321 0.063 0.882