latexTabular | R Documentation |
latexTabular
creates a character vector representing a matrix or
data frame in a simple ‘tabular’ environment.
latexTabular(x, headings=colnames(x),
align =paste(rep('c',ncol(x)),collapse=''),
halign=paste(rep('c',ncol(x)),collapse=''),
helvetica=TRUE, translate=TRUE, hline=0, center=FALSE, ...)
x |
a matrix or data frame, or a vector that is automatically converted to a matrix |
headings |
a vector of character strings specifying column
headings for ‘latexTabular’, defaulting to |
align |
a character strings specifying column
alignments for ‘latexTabular’, defaulting to
|
halign |
a character strings specifying alignment for column headings, defaulting to centered. |
helvetica |
set to |
translate |
set to |
hline |
set to 1 to put |
center |
set to |
... |
if present, |
a character string containing LaTeX markup
Frank E. Harrell, Jr.,
Department of Biostatistics,
Vanderbilt University,
fh@fharrell.com
latex.default
, format.df
x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c('c','d','this that')))
latexTabular(x) # a character string with LaTeX markup
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.