Making publication-ready tables with xtable

February 12, 2010
280 Views

When you use R at the command-line, the textual output is limited by the medium: one monospaced font, with no typesetting of any kind. That’s great when you’re doing exploratory analysis, but what about when you want to include R output in a report or publication? In other words, what if you want to convert this Analysis of Variance table:

 
Df Sum Sq Mean Sq F value Pr(>F)
sex 1 75.4 75.37 0.3793 0.539478
ethnicty 3 2572.1 857.38 4.3147 0.006781 **
sex:ethnicty 2 298.4 149.22 0.7509 0.474767
Residuals 93 18480.0 198.71

to this:

Aov 

or this

(more…)