tableContent: Functions relating to the data content of a table

View source: R/tableContent.R

find_tableContentR Documentation

Functions relating to the data content of a table

Description

Functions relating to the data content of a table

Usage

find_tableContent(table)

tableContent(table)

tableContent(table, asis = FALSE) <- value

Arguments

table

A tabular-like environment to work with.

asis

Should newlines be added around the value?

value

The content to be inserted into the cell. This can be a LaTeX2 object, or a character string that will be converted to one.

Details

Unless asis = TRUE, tableContent(table) <- value will add newlines at the start end end if not present, to make the result more readable.

Value

find_tableContent() returns the indices of the entries corresponding to content of the table.

tableContent() returns a LaTeX2 object containing all of the table content after the options.

Examples

latex <- kableExtra::kbl(mtcars[1:2, 1:2], format = "latex")
parsed <- parseLatex(latex)
table <- parsed[[find_tabular(parsed)]]
table
tableContent(table)

tableContent(table) <- "Mazda RX4 & 21 & 6\\\\"
table
tableContent(table, asis = TRUE) <- "Mazda RX4 & 21 & 6\\\\"
table


parseLatex documentation built on April 3, 2025, 5:27 p.m.