tableToLatex: Convert R table in LaTeX table

View source: R/tableToLatex.R

tableToLatexR Documentation

Convert R table in LaTeX table

Description

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.

Usage

tableToLatex(object, digits = 3, file = FALSE, double_space = FALSE)

Arguments

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

Value

Text on terminal or on a file to copy in LaTeX environment

Examples

mat <- matrix(1:9, nrow = 3)
mat

tableToLatex(mat)


Leonardo-Bo/rgrids documentation built on July 27, 2024, 2:19 a.m.