Type of table to produce. Possible values for type
are "latex" or "html".
Default value is "latex".
math.style.negative
In a LaTeX table, if TRUE, then use
$-$ for the negative sign (as was the behavior prior to version 1.5-3).
Default value is FALSE.
math.style.exponents
In a LaTeX table, if TRUE or
"$$", then use $5 \times 10^{5}$ for 5e5. If
"ensuremath", then use ensuremath{5 \times 10^{5}}
for 5e5. If "UTF-8" or "UTF-8", then use UTF-8 to
approximate the LaTeX typsetting for 5e5.
Default value is FALSE.
...
Additional arguments. Character strings or character
vectors.
Details
If type is "latex", sanitize() will replace
special characters such as & and the like by strings which will
reproduce the actual character, e.g. & is replaced by
&.
If type is "html", sanitize() will replace
special characters such as < and the like by strings which will
reproduce the actual character, e.g. < is replaced by
<.
When math.style.negative is TRUE, and type is
"latex", $-$ is used for the negative sign rather than a
simple hyphen (-). No effect when type is "html".
When type is "latex", and math.style.exponents
is TRUE or "$$", then use $5 \times 10^{5}$ for
5e5. If "ensuremath", then use ensuremath{5 \times
10^{5}} for 5e5. If "UTF-8" or "UTF-8", then use UTF-8
to approximate the LaTeX typsetting for 5e5.
When type is "latex"sanitize.final has no
effect. When type is "html", multiple spaces are
replaced by a single space and occurrences of ' align="left"'
are eliminated.
as.is and as.math are trivial helper functions to
disable sanitizing and to insert a some mathematics in a string
respectively.
Value
Returns the sanitized character object.
Author(s)
Code was extracted from print.xtable(), in version 1.8.0 of
xtable. Various authors contributed the original code: Jonathan
Swinton <jonathan@swintons.net>, Uwe Ligges
<ligges@statistik.uni-dortmund.de>, and probably David B. Dahl
<dahl@stat.byu.edu>.
as.is and as.math suggested and provided by Stefan
Edwards <sme@iysik.com>.