Dear (T)eXpeRts,
I try to create a LaTeX table from an R matrix for the first time. I am not
sure what the best approach is, I just read about latex() from Hmisc
(toLatex() didn't work).
Consider the following minimal example:
library(Hmisc)
mat - matrix(c(1,NA,3,100,1,4), ncol = 3, byrow
Have a look at xtable.
--- On Thu, 12/30/10, Marius Hofert m_hof...@web.de wrote:
From: Marius Hofert m_hof...@web.de
Subject: [R] latex() etc.: How to nicely format a matrix for a LaTeX document?
To: Help R r-h...@stat.math.ethz.ch
Received: Thursday, December 30, 2010, 11:50 AM
Dear
Thanks, John, I did.
Here is an update [not all problems are solved; can they be?]:
Consider:
library(xtable)
mat - matrix(c(1,NA,3,100,10012.23423,4), ncol = 3, byrow = TRUE)
print(xtable(mat, digits = 1), floating = FALSE, only.contents = TRUE,
include.rownames = FALSE,
On Thu, Dec 30, 2010 at 9:48 PM, Marius Hofert m_hof...@web.de wrote:
Thanks, John, I did.
Here is an update [not all problems are solved; can they be?]:
Consider:
library(xtable)
mat - matrix(c(1,NA,3,100,10012.23423,4), ncol = 3, byrow = TRUE)
print(xtable(mat, digits = 1), floating =
4 matches
Mail list logo