R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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.2612954 + ,0.1199274 + ,0.0852586 + ,0.0787527 + ,0.0475989 + ,0.0184526 + ,-0.0770353 + ,-0.0269715 + ,0.7787045 + ,-0.1638537 + ,-0.1836121 + ,-0.3507641 + ,0.0075108 + ,0.4577967 + ,0.6827424 + ,0.0616388 + ,0.2385877 + ,-0.4114253 + ,-105949972354199.0000000 + ,-0.2648054 + ,0.1070291 + ,0.1360179 + ,-0.1300411 + ,-0.0525067 + ,0.2999522 + ,-0.0058877 + ,0.5082153 + ,-0.2545075 + ,0.2698511 + ,0.2406800 + ,-0.8312265 + ,0.5704267 + ,-0.0304595 + ,-0.2219388 + ,-0.0537610 + ,-0.1964189 + ,0.4362073 + ,0.1386547 + ,-0.2652463 + ,-0.1002003 + ,0.4426762 + ,-0.0596184 + ,0.1241996 + ,-0.7183755 + ,0.0384192 + ,-0.0411679 + ,0.1062431 + ,-0.3550513 + ,-0.1364715 + ,0.5158243 + ,0.4844733 + ,-0.0873717 + ,-0.4396326 + ,-0.1563765 + ,-0.3812771 + ,-0.1394269 + ,0.0062911 + ,0.1457926 + ,0.3852481 + ,0.0586338 + ,-0.0986281 + ,-0.0997382 + ,-0.2143859 + ,0.1338376 + ,0.0347307 + ,0.2394928 + ,-0.5775264 + ,0.0199321 + ,-0.0806811 + ,-0.1985152 + ,-0.3648308 + ,0.2686832 + ,-0.1742388 + ,0.0603476 + ,-0.5146724 + ,-0.0254469 + ,0.9590277 + ,-0.2079646 + ,0.4114399 + ,-0.2411692 + ,0.3869621 + ,-0.3167880 + ,0.0850939 + ,0.3046019 + ,0.2917561 + ,0.4638277 + ,-0.0853615 + ,0.0856066 + ,-0.1002348 + ,0.1039727 + ,-0.3306544 + ,-0.4827168 + ,0.2309593 + ,0.5200578 + ,0.1699253 + ,-0.2429273 + ,-0.2344870 + ,0.0681538 + ,0.2928410 + ,-0.4215268 + ,-0.4898912 + ,0.2728075 + ,-0.0234383 + ,0.2437270 + ,0.1441034 + ,0.3486934 + ,-0.2023078 + ,-0.1854841 + ,-0.0074343 + ,-0.1426377 + ,0.1094409 + ,0.3583702 + ,0.2211597 + ,-0.0477162 + ,-0.1248808 + ,-0.0322416 + ,-0.3191736 + ,0.3667243 + ,0.4848844 + ,-0.0208251 + ,0.5054507 + ,0.0186890 + ,0.2491611 + ,-0.0125337 + ,0.4052350 + ,-0.0052602 + ,0.2340145 + ,-0.3319049 + ,-0.3975116 + ,-0.1006200 + ,-0.0256229 + ,0.3864107 + ,0.2341884 + ,0.2465479 + ,-0.4497857 + ,-0.1213249 + ,-0.1753105 + ,0.3623830 + ,0.0572417 + ,0.3763589 + ,-0.2915969 + ,-0.2416817 + ,0.0162782 + ,-0.1418666 + ,-0.3654466 + ,-0.7121934 + ,0.4687787 + ,0.3120325 + ,0.1293531 + ,0.1648593 + ,-0.4758823 + ,0.1885553 + ,0.1991413 + ,0.0473497 + ,-0.1827396 + ,0.1509197 + ,-0.5510143 + ,0.6503816 + ,0.0566364 + ,-0.4854993 + ,-0.0237593 + ,0.2340704 + ,0.4182033 + ,0.3923773 + ,0.4896438 + ,0.0558385 + ,0.1073176 + ,0.3541497 + ,0.3202133 + ,0.0060837 + ,0.5006057 + ,0.4108391 + ,0.1220578 + ,0.3928809 + ,0.0194724 + ,-0.2749880 + ,-0.3323001 + ,-0.8219820 + ,-0.6250797 + ,0.2913434 + ,0.3276369 + ,0.0527862 + ,-0.0724262 + ,-0.4526045 + ,-0.1601941 + ,-0.0564278 + ,-0.0577598 + ,-0.0998699 + ,-0.0713135 + ,0.1097104 + ,0.2555912 + ,-0.1260099 + ,-0.2107783 + ,0.1316683 + ,0.1201368 + ,0.2432284 + ,-0.4117344 + ,-0.2413680 + ,0.3052385 + ,0.0657756 + ,-0.1488040 + ,0.1193887 + ,0.1256285 + ,0.2601406 + ,0.2637692 + ,0.1564489 + ,-0.4806378 + ,-0.3081520 + ,0.0356640 + ,-0.5153010 + ,-0.3240954 + ,-0.1485235 + ,0.2335331 + ,0.4658222 + ,0.2535112 + ,-0.2585672 + ,104562110333126.0000000 + ,0.2992508 + ,0.5151253 + ,0.1458136 + ,-0.0456761 + ,-0.3869198 + ,0.0220983 + ,0.1746298 + ,0.0153408 + ,-0.0583372 + ,0.6180818 + ,-0.3458976 + ,0.3066144 + ,0.1971475 + ,-0.1520329 + ,0.6055431 + ,0.0256170 + ,-0.1293628 + ,-0.6566055 + ,-0.1435563 + ,0.1165143 + ,-0.0445963 + ,0.2245579 + ,-0.0519041 + ,0.4250692 + ,-0.0426066 + ,-0.3579304 + ,0.5294173 + ,0.0245672 + ,-0.0230731 + ,-0.0722307 + ,0.1362568 + ,-0.0340457 + ,0.3554641 + ,-0.0014537 + ,-0.0526226 + ,0.5779047 + ,0.1238081 + ,0.3384949 + ,0.2578782 + ,-0.3197173 + ,-0.0369641 + ,0.2043844 + ,-0.0281985 + ,-0.0628542 + ,-0.1879158 + ,-0.1466980 + ,0.5546829 + ,0.0170458 + ,0.1233742 + ,0.1237018 + ,-0.1105713 + ,-0.2544327 + ,-0.3824815 + ,-0.2182999 + ,0.0448819 + ,0.2738115 + ,0.2553722 + ,-0.0033340 + ,0.0779717 + ,0.0317364 + ,0.0759541 + ,0.1211982 + ,-0.4466220 + ,-0.1410048 + ,-0.1257054 + ,-0.4218211 + ,-0.1734130 + ,-0.1822666 + ,0.1446557 + ,-0.2500324 + ,0.4277234) > library(moments) > agostino <- agostino.test(x) > anscombe <- anscombe.test(x) > geary <- geary(x) > jarque <- jarque.test(x) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/17h4j1324568727.tab") > > > > proc.time() user system elapsed 0.350 0.040 0.393