Learn R Programming

huxtable (version 4.2.1)

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 {
foo <- 'Make $$$ with us'
sanitize(foo, type = 'latex')
# }

Run the code above in your browser using DataLab