tbl2tex | R Documentation |
Export a data frame to a fancy LaTeX table environment.
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 = " ")
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 |
This is a utility function intended to ease convertion of R objects to LaTeX format. It only exports data frame or data matrix nonetheless.
LaTeX code is routed through file or console for copying and pasting.
For now, it handles only numerical data.
Washington Leite Junger wjunger@ims.uerj.br
pgam
library(pgam) data(aihrio) m <- aihrio[1:10,4:10] tbl2tex(m,label="tbl:r_example",caption="R example of tbl2tex",digits=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.