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.


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:

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


Patrick 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 said...

I realize the last comment might be teasing. The document in question is

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.