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(6.66579716098685 + ,-1.14991562865021 + ,-1.79603040001339 + ,-18.4700692903106 + ,-12.8214065223235 + ,1.38665716245305 + ,13.4506902171292 + ,-3.04979696402705 + ,-3.57176204304957 + ,-12.7320953176455 + ,1.77797897078977 + ,-0.178846909964642 + ,-0.948663504764192 + ,-1.20380378585851 + ,-10.5564749163737 + ,5.32105597758011 + ,-19.1263017662835 + ,-8.20821017545146 + ,-0.861723966126758 + ,2.81282938210354 + ,13.8192403862728 + ,23.7626356911732 + ,-9.36782864394663 + ,-13.0354295863332 + ,11.7839465982839 + ,9.20682577008016 + ,-2.34568489161739 + ,-2.79801464674306 + ,-0.496994929667014 + ,-3.39262484176468 + ,-6.95461531091064 + ,13.9545872104826 + ,-11.8141210432007 + ,-4.93193696268311 + ,18.9657802936614 + ,28.7471971241746 + ,8.43177239016013 + ,-2.54348689606351 + ,-9.64950296353657 + ,19.6667953743618 + ,1.75354461456936 + ,-12.7654824550164 + ,-9.85443298182874 + ,-15.7607010365384 + ,-1.93938797503698 + ,6.98751026062598 + ,7.68064392240282 + ,7.73864162003415 + ,2.92038522241241 + ,-0.122556332769764 + ,14.2333678603435 + ,-2.11450669372579 + ,8.46393425485531 + ,-17.7237590165683 + ,-1.69747970461711 + ,0.519331480759363 + ,1.34397252942004 + ,-14.4255723456576 + ,0.472825908171421 + ,-5.9890446520356 + ,-8.39752265087017 + ,-2.93841282420111 + ,-8.65489806363658 + ,2.59683327400854 + ,-1.26268943677433 + ,4.80932734750565 + ,-8.6892260418941 + ,0.608044409841041 + ,-5.39218180454801 + ,23.2879449607947 + ,-25.9491842210118 + ,-0.7717019656024 + ,-3.81662962455432 + ,0.865132683570666 + ,-11.1831782691536 + ,-4.72056838135867 + ,21.2418797357859 + ,44.3542031337181) > 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/1z4fg1355865967.tab") > > > > proc.time() user system elapsed 0.368 0.085 0.424