]> git.donarmstrong.com Git - xtable.git/blobdiff - pkg/man/sanitize.Rd
Finished documentation changes to xtableFtable and xtableList. Package should be...
[xtable.git] / pkg / man / sanitize.Rd
index 3bba1072e6ee4b31800932c0833a75aae2c8ca63..5b65808de75afeedac5f584e7a33524e1b25e3f7 100644 (file)
@@ -2,6 +2,8 @@
 \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
@@ -16,6 +18,8 @@ sanitize(str, type)
 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
@@ -32,6 +36,8 @@ sanitize.final(str, type)
     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
@@ -59,6 +65,10 @@ sanitize.final(str, type)
   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
@@ -70,10 +80,11 @@ sanitize.final(str, type)
   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
@@ -87,6 +98,8 @@ x <- rnorm(10)
 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