Skip to content
Prev 269006 / 398502 Next

getting names of dimnames of xtabs into xtable latex output

Thanks to Duncan Mackay and Dennis Murphy for help.

The following solution seems to give me what I need.

library(memisc)
toLatex(ftable(cyl ~ am,data=mtcars))

For this to work, we have to use:

\documentclass{article}
\usepackage{booktabs}
\usepackage{dcolumn}
\begin{document}

at the beginning of the tex file. I learned this from some of Paul
Johnson's notes I found online ("Getting Nice Latex tables out of R").
On Tue, Aug 16, 2011 at 11:06 PM, Duncan Mackay <mackay at northnet.com.au> wrote: