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 ,1.42067475541106 ,-0.734902933590071 ,-1.29365044798636 ,-1.7727326134845 ,1.83019980487075 ,0.467982210757832 ,-0.745971219954872 ,-0.761334481166459 ,-1.13525417371997 ,1.54440329062536 ,1.21675377949865 ,3.83220051663693 ,1.44303479173377 ,-0.929075082359162 ,-1.61859884819362 ,0.582408732403396 ,0.792932807341565 ,1.2281195737769 ,-2.38378383371163 ,-2.51169781489261 ,0.416793836536571 ,-1.17473180616681 ,0.771881399708085 ,3.41172129317187 ,0.388212763760638 ,-2.05885257232189 ,-3.09038303904756 ,-1.8337895387925 ,0.980733924223529 ,-0.688869355082625 ,-1.70503032768749 ,0.131862608836546 ,-1.26702917909284 ,2.25585160367549 ,1.83821975100603 ,0.100342755931865 ,-0.157152943147458 ,0.13637651097312 ,-0.628825595233 ,-0.110924973010226 ,0.609997605230043 ,-0.026196531189468 ,0.292408230615889 ,0.137973631358762 ,0.167878010440769 ,0.700076700614753 ,-0.160873909709789 ,0.632935551745075 ,0.489352920329168 ,-0.806261385922493 ,-0.00103463035741977 ,0.119450188561717 ,-0.409824892930971 ,0.158635894521186 ,0.386331402310187 ,-1.081451753002 ,-0.502314238354024 ,-0.0245100223347612 ,0.789316567841052 ,1.1613894255539 ,-0.575048316795783 ,0.263722965601087 ,0.420233742857642 ,-0.688063003924322 ,-0.564670401344644 ,-0.202002782305909 ,0.0172021455658005 ,0.535498526672997 ,0.452480711474697 ,1.19031383611923 ,1.91251041759125 ,2.63002512076202 ,1.46178376692983 ,-0.1602656452595 ,-1.6907317647254 ,-1.6562980428568 ,-2.11635606133663 ,-0.92218316734675 ,-0.417520206192667 ,-0.41713196568586 ,-1.34008506433878 ,0.166832923296037 ,0.522447988526513 ,0.739491749327713 ,0.138682042593078 ,-0.297163293619161 ,0.105230081751801 ,-1.45350546629892 ,-0.162070030246 ,-0.927139144601558 ,0.365779504995932 ,-0.526013997982431 ,1.26261092679029 ,0.754074494223321 ,1.14661025182197 ,-0.226272568416282 ,0.4227978856114 ,0.849933422147477 ,-1.25073663250362 ,0.815289958459895 ,0.14686923121068 ,-0.929021251734848 ,-2.03272626375817 ,-0.590835229530419 ,0.315293042977364 ,1.81521156961373 ,0.981308329322937 ,0.368698802675125 ,-0.271948692748885 ,-0.737719923777296 ,0.169947330809059 ,0.254234999246197 ,0.469423750694481 ,-1.16983711088874 ,-0.807940616088886 ,0.0726965231052153 ,0.826507896363434 ,1.71696965548646 ,1.22291442988192 ,2.2301079672674 ,2.35954106251627 ,-0.0537551425752976 ,-0.848152074081639 ,-2.03657206679829 ,-1.46929283231202 ,-0.925873779715064 ,-1.7535871394809 ,-2.38571512596995 ,-0.449857067274203 ,-0.623396890383711 ,2.2565832765784 ,1.01643711367075 ,0.174781352409563 ,-0.532603409574424 ,-2.06064725470644 ,-0.346531687387097 ,0.382234467003395 ,-0.074786144636607 ,0.145479130609956 ,0.389536733197497 ,0.998145814175173 ,1.27862710808361 ,-0.319645549179783 ,0.329540457324466 ,-0.97045228425422 ,1.81771259239793 ,-0.561106760382296 ,-0.874986770447103 ,0.876845702762823 ,-0.803622031913441 ,-0.113679016247074 ,-0.869061102438768 ,1.2133589853742 ,0.94993264394086 ,2.2168799314881 ,0.960909086458409 ,1.20145765848225 ,-1.7476581121253 ,-1.23853949619582 ,-0.941817113946959 ,-0.639596166857436 ,-0.953183747812253 ,-1.70411697843312 ,-0.424030899252879 ,-0.354920773477876 ,0.0881270718183445 ,0.754391767274985 ,0.772843063987875 ,-0.171398981822671 ,0.108291921923332 ,0.231502542825213 ,1.06964964066864 ,-1.57862415321484 ,-0.993707532646988 ,1.08943335485849 ,-0.118362453196693 ,-0.599930808398891 ,1.52057694586442 ,0.298657560150702 ,1.28394809452811 ,1.23693518228161 ,-1.31462427329766 ,-0.366529511775646 ,-0.426750150336214 ,0.0448599676876242 ,-0.845005478127112 ,-1.35803059977899 ,0.100221229985002 ,0.547960144018061 ,0.920851699510716 ,0.191027163768774 ,0.490824068783099 ,-0.320282672096256 ,0.178120443733173 ,0.107268696886477 ,-1.18122545731848 ,1.02813623479977 ,-1.86823954244551 ,-0.0479927980937572 ,0.162658870338578 ,0.54145872387754 ,-0.601184004963034 ,0.911508269083948 ,-0.166850516548096 ,1.09356723879429 ,-0.585559519769112 ,0.572424965970412 ,-0.37598690462332 ,-0.173054536424989 ,-0.555252053690693 ,-0.779961349552623 ,-0.110301769196954 ,0.0420129648640212 ,0.129774534023333 ,-0.118178702996716 ,-0.0655084660709841 ,-0.607425109086927 ,1.41102564313122 ,0.522049946874039 ,1.21028614783787 ,-0.309417141483394 ,-0.388172012175024 ,-0.625544578498116 ,-0.36547483950734 ,0.185478027805505 ,-0.321919079379588 ,0.436040901598127 ,-0.0640348335847167 ,0.23799511239462 ,0.287136290297659 ,0.313136961357643 ,-0.357138217273337 ,1.22699239655383 ,0.419147902404397 ,-0.942496013452861 ,0.417257749259571 ,0.204118961633447 ,-1.06357942159824 ,-1.17557375195384 ,-0.654630153348932 ,1.00285215237696 ,0.0221260386814268 ,-0.299512320334269 ,0.21114778382474 ,1.52995401296684 ,0.428463935563034 ,-0.935643751562015 ,-0.316768087321895 ,-0.502551348075718 ,-0.220227132025598 ,-0.604449759655837 ,0.074206967100138 ,-0.0330395192705178 ,0.771287014946992 ,0.902600087011069 ,0.111157218883864 ,-0.0321110248574644 ,0.891288950344515 ,0.0111868809447798 ,0.455988742869078 ,-0.690504463010196 ,-1.43324880804879 ,-0.449275093361499 ,1.10828771269881 ,1.34814716270873 ,0.773740844180474 ,0.262546350943565 ,-0.0291060397823623 ,0.44273296202135 ,0.359999763469215 ,-0.189702557985531 ,-0.325297175847742 ,-0.638808115265561 ,0.497311324093334 ,-0.118555944379709 ,0.255781510019463 ,-0.803459970962824 ,-0.506132714223174 ,-0.900878113963379 ,-0.253375723131981 ,-0.0104730476316409 ,0.674360562467141 ,0.460329058549683 ,-1.01726421030117 ,-1.00790998975496 ,0.232035974831095 ,0.00550495822704421 ,0.445981994170506 ,-0.265283470051655 ,0.122309907804464 ,-0.441088320574034 ,-0.245934354359873 ,0.210505455556244 ,0.327520462907799 ,0.207871924836847 ,-0.422040145294678 ,-0.231230869922641 ,-1.56699959014276 ,-0.0219049089919384 ,-0.109804684048466 ,1.03971867879879 ,-0.0869123522591498 ,0.571499946654485 ,-0.0151956993580919 ,0.065004474707491 ,0.125426728861133 ,0.0647354939031507 ,0.36684063001561 ,-1.17183014201691 ,0.762956222980322 ,0.457742584288925 ,1.26873228737716 ,0.134078843993439 ,-0.629050687586963 ,-0.575725474623285 ,0.566041489828159 ,0.638729049770395 ,0.513007060199048 ,-0.400365965061245 ,0.974100557530304 ,0.0554349687638088 ,1.19857904290273 ,1.55420343986491 ,4.38018797005687 ,-0.717168522385345 ,-0.472447338586228 ,-2.07902281825875 ,-1.24290245010447 ,-1.63959358361576 ,-1.33199326886298 ,-0.912393949932386 ,-1.31841761646553 ,0.0283755746760514 ,-0.854992879689312 ,0.620568546149334 ,-0.310775002737066 ,0.207319884531536 ,-1.00633510314029 ,-0.321792831566128 ,-1.10871246880761 ,1.49364602488814 ,1.26353410333974 ,0.817887431461476 ,-1.08051358602629 ,0.0228153206273882 ,0.667222012342403 ,0.111083451492673 ,-0.89837055078919 ,1.26103182164636 ,-0.82955225942003 ,-2.14018680609198 ,-0.140828910313988 ,0.902142382112127 ,-0.535224768253417 ,0.824756488627961 ,-0.236655957277166 ,0.150987924237867 ,0.103730943224889 ,-1.25020475421367 ,0.584175668089979 ,-0.574321795626471 ,0.679699987362637 ,-0.165111982757189 ,0.63414714352193 ,-1.20092914758429 ,2.06493229848201 ,-0.573330150769415 ,0.370515286234609 ,-0.432120607737328 ,-0.0989157844071627 ,1.39352118017491) #'GNU S' R Code compiled by R2WASP v. 1.0.44 () #Author: Dr. Ian E. Holliday #To cite this work: Ian E. Holliday, 2011, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ #Source of accompanying publication: #Technical description: 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/1my4j1352546684.tab")