Sweave
and LaTeX
Sweave
and LaTeX
: Sweave
Manual: Sweave-manual-20050606.pdf
.nw
Sweave
files used in the Sweave
manual: Sweave .nw
file 1
Sweave .nw
file 2
Sweave .nw
file 3
LaTeX
: lshort.pdf
Sweave
and LaTeX
basics: ex.sweave.latex.nw Sweave
and LaTeX
basics: ex.sweave.latex.pdf
\usepackage
statements, modified title, and modified page numbering: Latex.template.nw
\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
to run outside of R (i.e., from a konsole command prompt): ~/bin
(i.e., /home/scottt/bin
) directory: cd ~\bin
~/bin
directory to see if a Sweave
shell script is already present: ls
Sweave
is listed in the contents of the directory, open Sweave
in a text editor (here I use pico
): pico Sweave
Sweave
is not present, open a new file to be named Sweave
in a text editor (again using pico
): pico Sweave
Sweave
was already present, make sure the opened file contains the following two lines (make sure it matches exactly). If Sweave
was not present, type the following lines in the text editor: #!/bin/sh
echo "library(tools) ; Sweave(\"$1.nw\")" | R --no-save --no-restore
pico
by typing Ctrl+X
to save the Sweave
file (answer Yes
to saving changes, and keep the name of the file as Sweave
).
Sweave
as a shell script: chmod +x
~/bin
directory. cd ~
.bashrc
(a hidden file) in a text editor: pico .bashrc
export PATH=$PATH:~/bin
pico
by typing Ctrl+X
to save your .bashrc
file (answer Yes
to saving changes, and keep the name of the file as .bashrc
).
Sweave
documents. .nw
file used to create the linked pdf file: RCitation.nw:
.bib
file to create and reference: Rbiblioref.bib