There are a range of tools available for creating publication quality tables using R, Sweave, and LaTeX.
In particular, there are helper functions like latex in the Hmisc package, and xtable in the xtable package. I've also often written my own code so that I could have complete control over table formatting (e.g., see this example).
However, when preparing publication quality tables a range of issues often arise:
- how and when to apply numeric formatting
- how to precisely control alignment of columns and cells
- how to precisely control cell borders
- how to convert variable labels to variable names
- and so on
Beyond the high level issues of specifying the desired table format, there are issues of implementation.
- When should a helper function such as
xtablebe used? - Which helper function should be used in a given situation?
- How can the default output of helper functions be customised to particular requirements?
Question
It seems to me that the above issues are deserving of a detailed textbook-style introduction.
Are there any online or offline resources that provide a detailed overview of how to produce publication quality tables using R, Sweave, and LaTeX, and that address the issues discussed above?
knitrto the list. It seems to solve a lot of the integration issues with Sweave and cacheing and tikz. But good q. - Ari B. Friedmanxtable. - Yihui XieHmisc'slatexfunction more flexible thanxtable. The Booktabs (to fine-tune the spaces) and Datatool (to read CSV files) LaTeX packages may also be useful. - Vincent Zoonekyndlatexfrom Hmisc far too complicated. Everything that I generally need to be able to do is done inprint.xtable()andxtable(). If you're creating something for publication, you are ALWAYS going to have to massage anything that's generated automatically. You can create wrapper functions for xtable, print.xtable and latex that suit particular situations. - Brandon Bertelsen