.as.latex.table | R Documentation |
This function takes a data.frame and returns a table in LaTeX code that can be copied into any tex document.
.as.latex.table(
x,
row.names = NULL,
col.names = NULL,
comments = TRUE,
pos = "c",
digits = 3,
rm.zero = TRUE,
select,
split = NULL,
tabular_only = FALSE,
...
)
x |
data.frame or |
row.names |
currently unused |
col.names |
currently unused |
comments |
logical (with default): insert LaTex comments |
pos |
character (with default): |
digits |
numeric (with default): number of digits to be displayed (numeric fields) |
rm.zero |
logical (with default): remove columns containing only zeros, however, this might not be wanted in all cases |
select |
character (optional): a character vector passed to subset |
split |
integer (optional): an integer specifying the number of individual tables the data.frame is split into. Useful for wide tables. Currently unused. |
tabular_only |
logical (with default): if |
... |
options: |
Returns LaTeX code
0.2.0
Christoph Burow, University of Cologne (Germany), Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany)
df <- data.frame(x = 1:10, y = letters[1:10])
.as.latex.table(df)
.as.latex.table(df, pos = "lr")
.as.latex.table(df, select = "y", pos = "r")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.