kableExtra_utils: Special Character Escape

kableExtra_utilsR Documentation

Special Character Escape

Description

These utility functions were copied from the internals of kableExtra, and assist in escaping special characters in LaTeX and HTML tables. These function assist in the creations of tables via as_kable_extra().

Usage

.escape_html(x)

.escape_latex(x, newlines = TRUE, align = "c")

.escape_latex2(x, newlines = TRUE, align = "c")

Arguments

x

character vector

Value

character vector with escaped special characters

See Also

as_kable_extra()

Examples

.escape_latex(c("%", "{test}"))
.escape_html(c(">0.9", "line\nbreak"))

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.