powered by
This escapes a string for LaTeX, HTML or RTF.
sanitize(str, type = c("latex", "html", "rtf"))
A character object.
"latex", "html" or "rtf".
"latex"
"html"
"rtf"
The sanitized character object.
HTML and LaTeX code was copied over from xtable::sanitize().
xtable::sanitize()
# NOT RUN { foo <- 'Make $$$ with us' sanitize(foo, type = 'latex') # }
Run the code above in your browser using DataLab