tableToLatex | R Documentation |
Given a numeric matrix, a data.frame, a tibble or a data.table returns a basic LaTeX table write with table and tabular packages. Rownames and colnames are highlighted with bold.
tableToLatex(object, digits = 3, file = FALSE, double_space = FALSE)
object |
A numeric matrix, data.frame, tibble or data.table |
digits |
Number of decimals. Default = 3 |
file |
If TRUE write file with object name in work directory. Default FALSE |
double_space |
If TRUE add empty columns to increase space between columns |
Text on terminal or on a file to copy in LaTeX environment
mat <- matrix(1:9, nrow = 3)
mat
tableToLatex(mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.