\alias{sanitize}\r
\alias{sanitize.numbers}\r
\alias{sanitize.final}\r
+\alias{as.is}\r
+\alias{as.math}\r
\r
\title{\r
Sanitization Functions\r
sanitize.numbers(str, type, math.style.negative = FALSE,\r
math.style.exponents = FALSE)\r
sanitize.final(str, type)\r
+as.is(str)\r
+as.math(str, ...)\r
}\r
\r
\arguments{\r
for 5e5. If \code{"UTF-8"} or \code{"UTF-8"}, then use UTF-8 to\r
approximate the LaTeX typsetting for 5e5.\r
Default value is \code{FALSE}.}\r
+ \item{\dots}{Additional arguments. Character strings or character\r
+ vectors.}\r
}\r
\details{\r
\r
effect. When \code{type} is \code{"html"}, multiple spaces are\r
replaced by a single space and occurrences of \code{' align="left"'}\r
are eliminated.\r
+\r
+ \code{as.is} and \code{as.math} are trivial helper functions to\r
+ disable sanitizing and to insert a some mathematics in a string\r
+ respectively.\r
}\r
\value{\r
Returns the sanitized character object.\r
Swinton <jonathan@swintons.net>, Uwe Ligges\r
<ligges@statistik.uni-dortmund.de>, and probably David B. Dahl\r
<dahl@stat.byu.edu>.\r
+ \code{as.is} and \code{as.math} suggested and provided by Stefan\r
+ Edwards <sme@iysik.com>.\r
}\r
\r
\examples{\r
-\r
insane <- c("&",">", ">","_","\%","$","\\\\","#","^","~","{","}")\r
names(insane) <- c("Ampersand","Greater than","Less than",\r
"Underscore","Percent","Dollar",\r
sanitize.numbers(x, "latex", TRUE)\r
sanitize.numbers(x*10^(10), "latex", TRUE, TRUE)\r
sanitize.numbers(x, "html", TRUE, TRUE)\r
+as.is(insane)\r
+as.math("x10^10", ": mathematical expression")\r
}\r
\r
\keyword{print }\r