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(867.887509505211 + ,-2250.28069676838 + ,33618.3570412959 + ,9954.34468238836 + ,354.191730842355 + ,18882.406400463 + ,20229.4310915672 + ,268402.416151187 + ,-113346.926055862 + ,-45016.394227939 + ,35069.861367254 + ,58531.0957290091 + ,-77256.3771198791 + ,-31473.594568955 + ,-52391.0075132882 + ,32854.9847569661 + ,101107.732845397 + ,-176275.960398033 + ,79531.884415102 + ,-176414.251561376 + ,151290.579462589 + ,167731.594163443 + ,143237.122434691 + ,80251.9665265577 + ,118735.726273623 + ,75035.8259037494 + ,19198.3085437346 + ,-36364.5639276314 + ,-36170.5787440905 + ,-109567.395064155 + ,-100783.336097857 + ,-149267.403931369 + ,38947.3510583149 + ,58613.0600994635 + ,16074.4602044407 + ,-41563.0049150659 + ,-15970.5964777959 + ,-47563.9548420802 + ,59595.3577179922 + ,65897.8405390448 + ,-166489.283203891 + ,46312.3269884632 + ,-15952.8722863516 + ,-87780.6523566012 + ,134744.172737777 + ,75232.8122408289 + ,24408.7558471514 + ,-15406.1403381955 + ,-3766.75348767364 + ,27197.2239951006 + ,-46777.2890031503 + ,-82472.8212609495 + ,-35154.7184801844 + ,-46946.870011609 + ,-43641.5364941684 + ,-54920.7084991732 + ,54905.4038222157 + ,-10509.5840707596 + ,-13706.8046976985 + ,-42347.6087628011 + ,-28990.4687708701) > 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/1luqp1354095586.tab") > > > > proc.time() user system elapsed 0.325 0.083 0.411