huxtable (version 4.5.0)

sanitize: Escape text for various formats

Description

This escapes a string for LaTeX, HTML or RTF.

Usage

sanitize(str, type = c("latex", "html", "rtf"))

Arguments

str

A character object.

type

"latex", "html" or "rtf".

Value

The sanitized character object.

Details

HTML and LaTeX code was copied over from xtable::sanitize().

Examples

Run this code
# NOT RUN {
txt <- "Make $$$ with us"
sanitize(txt, type = "latex")
# }

Run the code above in your browser using DataCamp Workspace