powered by
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 = " ")
LaTeX code is routed through file or console for copying and pasting.
object of type data frame or matrix
label for LaTeX cross reference
caption for LaTeX tabular environment
logical. TRUE for centered cells
TRUE
alignment of the object on the page
decimal digits after decimal point
logical. TRUE for horizontal borders
logical. TRUE for vertical borders
filename for outputting. If none is provided, LaTeX code is routed through the console
text for the top-left cell of the table
Washington Leite Junger wjunger@ims.uerj.br
This is a utility function intended to ease convertion of R objects to LaTeX format. It only exports data frame or data matrix nonetheless.
pgam
library(pgam) data(aihrio) m <- aihrio[1:10,4:10] tbl2tex(m,label="tbl:r_example",caption="R example of tbl2tex",digits=4)
Run the code above in your browser using DataLab