Sweave
and LaTeX
Sweave
and LaTeX
: LaTeX
"preamble" to use in your .nw file: Sweave.Template.nw
Sweave
Manual and example .nw Sweave
files used in the Sweave
manual can be found here.
LaTeX
can be found here.
Sweave
from within Emacs
\end{document}
expression if you get the following error from Sweave
:Warning message:
incomplete final line found by readLines on `blah.nw'
.nw
file: %
(percent) signs (the LaTeX
comment symbol) to comment out lines of text and whole R code chunks (i.e., from the <<>>=
to the @
headers).
#
(number) signs (the R comment symbol) to comment out lines of R code within an R code chunk (i.e., between the <<>>=
to the @
headers).
Sweave
as a batch process outside of R (i.e., from a konsole
command prompt), run this command: R CMD Sweave foo.Rnw
, replacing .Rnw
with .nw
or whatever you use for the file suffix. You may want to run this command after R finishes if you have set up to use a directory graphics
and forgot to tell Sweave
not to create .eps
files when you are using pdflatex
: rm -f Rplots.ps graphics/*.eps
Sweave
documents. .nw
file used to create the linked pdf file: RCitation.nw
.bib
file to create and reference: Rbiblioref.bib
upData()
function invocation to generate a long variable label that will automatically wrap in the LaTeX
version of a summary.formula()
(with reverse = TRUE
) table. The strwrap()
function width=
argument will dictate how wide the label is.