tbl2tex {pgam} | R Documentation |
LaTeX table exporter
Description
Export a data frame to a fancy LaTeX table environment.
Usage
tbl2tex(tbl, label = "tbl:label(must_be_changed!)",
caption = "Table generated with tbl2tex.", centered = TRUE,
alignment = "center", digits = getOption("digits"), hline = TRUE,
vline = TRUE, file = "", topleftcell = " ")
Arguments
tbl |
object of type data frame or matrix |
label |
label for LaTeX cross reference |
caption |
caption for LaTeX tabular environment |
centered |
logical. |
alignment |
alignment of the object on the page |
digits |
decimal digits after decimal point |
hline |
logical. |
vline |
logical. |
file |
filename for outputting. If none is provided, LaTeX code is routed through the console |
topleftcell |
text for the top-left cell of the table |
Details
This is a utility function intended to ease convertion of R objects to LaTeX format. It only exports data frame or data matrix nonetheless.
Value
LaTeX code is routed through file or console for copying and pasting.
Note
For now, it handles only numerical data.
Author(s)
Washington Leite Junger wjunger@ims.uerj.br
See Also
Examples
library(pgam)
data(aihrio)
m <- aihrio[1:10,4:10]
tbl2tex(m,label="tbl:r_example",caption="R example of tbl2tex",digits=4)