Avoid displayed digits during compilation sweave / pgfsweave

When compiling with sweave / pgfsweave, every time a shape is created in R, it is displayed in graphic windows (during the compilation process of sweave). This is useful in many cases, as I can see how the numbers look, as the document is compiled.

But when I compile a large document through ssh, it can be very slow. Is there a way to say sweave / pgfsweave to avoid displaying the figure at compile time (I still want the figure in the final PDF to be).

+4
source share
4 answers

figs.only Sweave . ( ) figs.only=TRUE.

RweaveLatex:

figs.only: logical ('FALSE).            , .                                  . ,            ,            .

Sweave, : (1) (, Sweave("example.Rnw", figs.only=TRUE); (2) .Rnw, \SweaveOpts{figs.only=TRUE} (3) , SWEAVE_OPTIONS="figs.only=TRUE" , , $R_HOME/etc/Renviron.site

+4

, , .

You can run R from the command line by simply typing R CMD Sweave mydoc.Rnweither through a batch file or make file for larger projects. I started using makefiles for many of my sweave documents, as it handles dependencies, can clear up after itself, and much more.

+1
source

One option may be

<<label=myplotlabel, fig=TRUE, include=FALSE>>=
graph code
@

then

\begin{figure}[h]
   \includegraphics[width=6cm, height=6cm]{myplotlabel}
   \caption{My Plot}
   \label{fig:label}
\end{figure}
0
source

All Articles