R: Escape text for various formats

sanitize {huxtable} | R Documentation

## 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"`.

### Details

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

### Value

The sanitized character object.

### Examples

    foo <- 'Make $$$ with us'
    sanitize(foo, type = 'latex')

[Package huxtable version 4.2.0 Index]