Tools for making latex tables in R
On general request, a community wiki on producing latex tables in R. In this post I'll give an overview of the most commonly used packages and blogs with code for producing latex tables from less straight-forward objects. Please feel free to add any I missed, and/or give tips, hints and little tricks on how to produce nicely formatted latex tables with R.
Packages :
- xtable : for standard tables of most simple objects. A nice gallery with examples can be found here.
- memisc : tool for management of survey data, contains some tools for latex tables of (basic) regression model estimates.
- Hmisc contains a function
latex()that creates a tex file containing the object of choice. It is pretty flexible, and can also outputlongtablelatex tables. There's a lot of info in the help file?latex
Blogs and code snippets
- There is the outreg function of Paul Johnson that gives Stata-like tables in Latex for the output of regressions. This one works great.
- As given in an earlier question, there's a code snippet to adapt the memisc package for lme4 objects.
Related questions :
- Suggestion for R/LaTeX table creation package
- Rreport/LaTeX quality output package
- sorting a table for latex output with xtable
- Any way to produce a LaTeX table from an lme4 mer model fit object?
- R data.frame with stacked specified titles for latex output with xtable
- Automating adding tables fast to latex from R
