Download The Hmisc Package
Transcript
latex
143
latex.default does appropriate rounding and decimal alignment and produces a file containing
a LaTeX tabular environment to print the matrix or data.frame x as a table.
latex.function prepares an S function for printing by issuing sed commands that are similar
to those in the S.to.latex procedure in the s.to.latex package (Chambers and Hastie,
1993).
latex.list calls latex recursively for each element in the argument.
latexTranslate translates particular items in character strings to LaTeX format, e.g., makes
a^2 = a$^2$ for superscript within variable labels. LaTeX names of greek letters (e.g., "alpha")
will have backslashes added if greek==TRUE. Math mode is inserted as needed. latexTranslate
assumes that input text always has matches, e.g. [) [] (] (), and that surrounding by $$ is
OK.
latexSN converts a vector floating point numbers to character strings using LaTeX exponents.
Dollar signs to enter math mode are not added.
latexVerbatim on an object executes the object’s print method, capturing the output for a
file inside a LaTeX verbatim environment.
dvi uses the system latex command to compile LaTeX code produced by latex, including
any needed styles. dvi will put a documentclass{report} and end{document} wrapper around a
file produced by latex. By default, the geometry LaTeX package is used to omit all margins
and to set the paper size to a default of 5.5in wide by 7in tall. The result of dvi is a .dvi file.
To both format and screen display a non-default size, use for example print(dvi(latex(x),
width=3, height=4),width=3,height=4). Note that you can use something like xdvi
-geometry 460x650 -margins 2.25in file without changing LaTeX defaults to emulate this.
dvips will use the system dvips command to print the .dvi file to the default system printer, or
create a postscript file if file is specified.
dvigv uses the system dvips command to convert the input object to a .dvi file, and uses the
system dvips command to convert it to postscript. Then the postscript file is displayed using
Ghostview (assumed to be the system command gv).
There are show methods for displaying typeset LaTeX on the screen using the system xdvi
command. If you show a LaTeX file created by latex without running it through dvi using
show.dvi(object), the show method will run it through dvi automatically. These show
methods are not S Version 4 methods so you have to use full names such as show.dvi and
show.latex. Use the print methods for more automatic display of typesetting, e.g. typing
latex(x) will invoke xdvi to view the typeset document.
Usage
latex(object, title=first.word(deparse(substitute(object))), ...)
## Default S3 method:
latex(object,
title=first.word(deparse(substitute(object))),
file=paste(title, ".tex", sep=""),
append=FALSE, label=title,
rowlabel=title, rowlabel.just="l", cgroup=NULL, n.cgroup=NULL,
rgroup=NULL, n.rgroup=NULL,