Possible Duplicate:
How can I use a table generated by R in LaTeX?

I use a lot of tables from R, and I find it cumbersome and very slow to type the "&" and "\" etc. to get the tables translated into LaTeX. Is there some way to have a table like that below automatically formatted for LaTeX?

      Df Deviance Resid. Df Resid. Dev
NULL                      74    1233.55
inflat  1     4.13        73    1229.42
inc     1   907.24        72     322.18
Analysis of Deviance Table

       Df Deviance Resid. Df Resid. Dev
NULL                      59    1450.07
inflat  1    99.44        58    1350.63
inc     1   861.93        57     488.69
Analysis of Deviance Table

       Df Deviance Resid. Df Resid. Dev
NULL                     158    28963.3
inflat  1   3302.4       157    25660.9
inc     1  23996.2       156     1664.8
link|improve this question

65% accept rate
9  
You can use the R xtable package to generate LaTeX directly from R. See How can I use a table generated by R in LaTeX – Alan Munn Nov 14 '11 at 12:14
feedback

closed as exact duplicate by Seamus, Torbjørn T., Alan Munn, Joseph Wright Nov 16 '11 at 13:35

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

Using the XTable package as Alan commented. There's a good set of example tables as part of the CRAN XTable vignette. You may also want to look at the descr package which has helper function to produce some other usefull tables.

Xtable can either just produce the latex code that you can copy/paste into a tex file, or you can use it within a sweave document to produce the tables automatically as part of your analysis.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.