Learn R Programming

huxtable (version 5.5.7)

sanitize: Escape text for various formats

Description

This escapes a string for LaTeX, HTML or RTF.

Usage

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

Value

The sanitized character object.

Arguments

str

A character object.

type

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

Details

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

Examples

Run this code
txt <- "Make $$$ with us"
sanitize(txt, type = "latex")

Run the code above in your browser using DataLab