Learn R Programming

gtsummary (version 1.6.2)

kableExtra_utils: 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")

Value

character vector with escaped special characters

Arguments

x

character vector

See Also

as_kable_extra()

Examples

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

Run the code above in your browser using DataLab