Friday, October 22, 2010

For a wider use of R

Two things that are crucial for a wider use of R among applied researchers. The first one is data manipulation/reshaping tool. I think the package "reshape" and "reshape2" have done good job and have largely removed the barrier. The second one is a universal output processing engine, something like the "eststo, esttab, estsadd" combo in Stata. The package "xtable", "memisc", "aprstable", and "estout" have made some progress, but they all are limited to some estimation procedures and none of them provides a universal output process engine for "all" estimation procedures. One of the main reason I am still paying for Stata is the convenience of directly producing publication quality LaTeX tables from any estimation procedures without having to manually change anything.

I wish more attention can be devoted to this latter issue.

6 comments:

Anonymous said...

There is lots on this. Particularly Paul Johnston's outreg() function. The R Programming wikibook talks about this and more in an article about Publication Quality Output. Starting from Johnston's function, it isn't hard to write your own customized to have the summary statistics and format you like. Adding functionality for different classes (mer, plm, whatever) isn't hard, either.

Tal Galili said...

Good points.

Regarding the second one, I've been asking around about it sometime ago:
http://stats.stackexchange.com/questions/3151/how-to-capture-r-textimage-output-into-one-file-html-doc-pdf-etc

I think this will get some good advances soon (see my chosen answer)
But it will take some more time.

Best,
Tal

Patrick Burns said...

I would put a point zero before your two points. It is documentation for people that know no R at all. I've made an attempt at that, but there should be a lot more.

Patrick Burns said...

I realize the last comment might be teasing. The document in question is http://www.burns-stat.com/pages/Tutor/hints_R_begin.html

FD said...

xtable can be fairly generic. I usually convert my the output of estimation to a data.frame (at least the parts that I want) and then use xtable to spit that into LaTeX.

Shige said...

Transporting the results to LaTeX via data frames sound promising. Do you care to elaborate? I think many people will be interested in seeing a short demo.

Counter