[R] xtable and column headings
Richard M. Heiberger
rmh at temple.edu
Thu Feb 1 16:58:01 CET 2007
I would use latex() in the Hmsic package. Here is a short example
tmp <- matrix(1:12,4)
library(Hmisc)
tmp.latex <- latex(tmp, colheads=c("abc$_1$","def$^{12}_4$","$g\\times h$"))
## note the escaped "\" in the above colheads vector
print.default(tmp.latex)
Copy the contents of the file referenced in tmp.latex to your
real myfile.tex file.
There are about a zillion optional arguments to latex() that give you very fine
control over the appearance of the typeset object. See ?latex
More information about the R-help
mailing list