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(9.25191650214777 + ,22.2914871231093 + ,-37.1571787652725 + ,34.2241616971526 + ,-175.791407724228 + ,104.976083789095 + ,-61.2440566196127 + ,-396.729670521475 + ,-396.444398116046 + ,-260.009316249011 + ,127.969010842559 + ,-36.0298439891068 + ,204.138369307228 + ,44.2385868225793 + ,-159.706287587307 + ,203.135138015573 + ,121.756524240115 + ,-16.201912213436 + ,-243.900810018248 + ,391.694842812422 + ,-164.230167511809 + ,293.821184036089 + ,150.197655606598 + ,-191.027489040204 + ,251.842321753795 + ,-153.374881206835 + ,8.18402595915808 + ,276.197036933044 + ,7.49356404026701 + ,290.310133584149 + ,154.709015296672 + ,-344.563215955918 + ,-268.812624672229 + ,308.788007355503 + ,53.4487117440732 + ,309.745158451771 + ,86.3072721968555 + ,-34.8646306315522 + ,196.561770309702 + ,226.513512287148 + ,-188.002590167187 + ,-58.5622808865756 + ,209.148059688065 + ,145.969099712344 + ,129.401752382899 + ,-33.029934043082 + ,-386.049808215712 + ,144.248501282334 + ,117.138964771591 + ,129.897118044206 + ,-152.218688907773 + ,-55.0236881924031 + ,144.022136077333 + ,-16.8566548273021 + ,144.685804574834 + ,-160.202973636103 + ,329.620650922733 + ,138.317376113334 + ,9.00038368194928 + ,50.5918463808212 + ,313.87529752068 + ,236.907637607133 + ,110.05132904939 + ,-383.848947466715) > 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/1g4x91355830188.tab") > > > > proc.time() user system elapsed 0.354 0.105 0.454