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.022233741935946 + ,-0.0337049618302789 + ,0.0483091173022536 + ,-0.0328230112698192 + ,-0.00129211833139745 + ,0.0493110612449295 + ,0.0546224665122492 + ,-0.117861816687168 + ,0.0964634691039859 + ,-0.057206691269101 + ,0.0169055095472312 + ,0.000418453742588826 + ,-0.0332118403822401 + ,0.0549981998657286 + ,0.0127322326541685 + ,0.0610913283233975 + ,-0.0019111424907391 + ,0.0429458684670947 + ,0.0883744311870188 + ,-0.0253372305781694 + ,0.0442751936347496 + ,-0.0498065743387287 + ,-0.115577586197062 + ,0.0482822007571424 + ,-0.0269254394285212 + ,0.0417421106977919 + ,0.121288318284434 + ,0.0506920605675248 + ,-0.0452100830718099 + ,0.0262370611392832 + ,-0.114723096048744 + ,-0.0508642347280115 + ,0.0633687372187966 + ,-0.0541211052632598 + ,0.0407749763734133 + ,-0.0941128595786898 + ,0.015435653543991 + ,-0.055324663916535 + ,-0.00950078905111242 + ,-0.0107386844092742 + ,0.0648371464786483 + ,0.11783327215929 + ,-0.0699628235512219 + ,-0.0169086371785917 + ,0.0125207069884029 + ,-0.117606708120584 + ,-0.12614630195538 + ,-0.0120468227653684 + ,0.101403460910754 + ,0.0406400849913568 + ,-0.0998269376329929 + ,-0.0840652332813605 + ,0.067433385830686 + ,-0.0265257998508688 + ,-0.132208402109275 + ,-0.0634075932392397 + ,-0.074637185996262 + ,0.00439331775862862 + ,0.0714154313280112 + ,-0.00840885782343924 + ,-0.0197141074033701 + ,-0.0151630828547778 + ,0.0023018283282845 + ,0.0626848114865405 + ,-0.0375980238509903 + ,-0.00672354088742954 + ,-0.0634845532183547 + ,0.0080777000853584 + ,0.0532357321344355 + ,0.156246992095981 + ,0.00428156239990805 + ,-0.0907271168789632 + ,0.0149871900305455 + ,-0.0654535629443536 + ,-0.0436503883976878 + ,0.114006133819454 + ,-0.0464039946737136 + ,0.163564705337558 + ,0.196650273011862 + ,-0.0365294743495848 + ,0.0551816376522701 + ,0.0193293408632397 + ,-0.00119475807828245 + ,0.13824857305317 + ,0.0326052113167632 + ,0.0345141739983188 + ,0.163559451703034 + ,0.0519730070697135 + ,-0.0978115986661146 + ,-0.0343292816406266 + ,0.021378350032612 + ,-0.066554633721728 + ,0.0439363847934594 + ,-0.0372268476233024 + ,0.129504606838199 + ,-0.0475261499399805 + ,-0.0252802111384205 + ,-0.0255631547951124 + ,0.0621350132274366 + ,-0.00616652765913827 + ,-0.036725766927999 + ,0.0146705008550498 + ,0.122403575135419 + ,0.0190496624176541 + ,0.0194296827557652 + ,-0.0830623797931113 + ,-0.0579912101991109 + ,-0.0912263140235452 + ,-0.066820349773012 + ,0.0570150520255438 + ,0.105734369136635 + ,-0.0731390574093828 + ,0.163256913206732 + ,-0.0919587164866352 + ,0.0533918381211822 + ,-0.032307594418593 + ,0.101959726283765 + ,0.126263056913576 + ,-0.0253694810886072 + ,-0.00381195416068994) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = '' > library(moments) > agostino <- agostino.test(x) > anscombe <- anscombe.test(x) > geary <- geary(x) > jarque <- jarque.test(x) > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/1khhq1356034024.tab") > > > > proc.time() user system elapsed 0.330 0.098 0.409