[Tikzdevice-bugs] pgfSweave partly working, but problems with figures (R hangs) - help?

Jenny Hutchison jenny at ausvet.com.au
Tue Nov 22 13:44:28 CET 2011


Dear list,
I have been using sweave for some time now (using Eclipse and StatET on
Windows 7 64 bit) and now want to move to using pgfSweave. I am
tantalisingly close to having things working, I think, but would appreciate
your assistance in getting figures to work.

I'm running the simple example from here:
https://github.com/cameronbracken/pgfSweave/blob/master/inst/example/pgfSweave-latex-example.Rnw

And although (encouragingly!) I get the following output in the  R console
(R-2.14.0 64 bit):
> pgfSweave(file =
"C:\\Users\\me\\Documents\\Projects\\EclipseWorkspace\\SANDBOX_pgfSweave\\Example.Rnw")
Writing to file Example.tex
Processing code chunks with options ...
 1 : keep.source term verbatim (label=setup)
 2 : echo highlight tidy keep.source term verbatim (label=data)
 3 : echo highlight keep.source term verbatim tikz external (label=boxplot)
(Re)Running External Chunk: boxplot

You can now run (pdf)latex on 'Example.tex'

AND there is the appropriate figure showing up in the graphics device (an
ozone distribution boxplot),

BUT: despite the R console telling me to go off and run latex, it stays
hung up processing the figure - doesn't seem to get beyond 6%. In
frustration, I end up cancelling the last command. I guess because all the
latex side of things has already been taken care of, I do have a latex file
and can generate the pdf, but (not surprisingly, I guess), there is no
image in it.
The message in the pdf is [[ IMAGE DISCARDED DUE TO
'/tiks/external/mode=list and make']]. The good news is that rest of the
document looks great.

I have tried with even simpler examples (e.g. in attachment), and much the
same thing happens - R hangs at 6%, on the figure chunk.

I'm attaching some more information about my system and the
tikzStringWidthCalc.log file to this email, but must admit I don't know if
this mailing list accepts attachments this way, or if they will be stripped
off. Happy to post them, and any other information required to help with
the problem.

Thank you,
Jenny

-- 
Dr Jenny Hutchison

Email: jenny at ausvet.com.au
-------------- next part --------------
# NOTE: I am using Eclipse with StatET and have been successfully using sweave for some time
# pgf and viewer are installed
################################################################
R version 2.14.0 (2011-10-31)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-mingw32/x64 (64-bit)

################################################################
> library(pgfSweave)
Loading required package: stashR
Loading required package: filehash
filehash: Simple key-value database (2.2 2011-07-21)
A Set of Tools for Administering SHared Repositories (0.3-4 2011-07-15)
Loading required package: highlight
Loading required package: tools
Loading required package: codetools
Loading required package: parser
Loading required package: Rcpp
Loading required package: optparse
Loading required package: getopt
Loading required package: formatR
tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.6.2)
Checking for a LaTeX compiler...


A working LaTeX compiler was found by checking:
	The PATH using the command pdflatex

Global option tikzLatex set to:
	C:\PROGRA~2\MIKTEX~1.9\miktex\bin\pdflatex.exe

MiKTeX-pdfTeX 2.9.4225 (1.40.12) (MiKTeX 2.9)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh



A working XeLaTeX compiler was found by checking:
	The PATH using the command xelatex

Global option tikzXelatex set to:
	C:\PROGRA~2\MIKTEX~1.9\miktex\bin\xelatex.exe

MiKTeX-XeTeX 2.9.4225 (0.9997.5) (MiKTeX 2.9)
(C) 1994-2008 by SIL International, (C) 2009-2011 by Jonathan Kew


pgfSweave: Using PGF Version 2.10

################################################################
# TEST
\documentclass{article}
\usepackage{tikz}
\usepackage[nogin]{Sweave}
\begin{document}
\begin{figure}[ht]
\centering
<<inline, echo =F, results =tex >>=
require(tikzDevice)
tikz(console =T, width =5, height =5)
x <-rnorm(100)
plot(x)
dummy<-dev.off()
@
\caption{caption}
\label{fig:inline}
\end{figure}
\end{document}
################################################################
# R Console output
Writing to file TEST.tex
Processing code chunks with options ...
 1 : keep.source term tex (label=inline)
Creating temporary TikZ metrics dictionary at:
	C:\Users\JENNIF~1\AppData\Local\Temp\RtmpgrtAly/tikzMetricsDictionary

You can now run (pdf)latex on 'TEST.tex'
Not regenerating makefile for externalization, if your figures have changed, remove C:\Users\me\Documents\Projects\EclipseWorkspace\SANDBOX_pgfSweave\TEST.makefile and recompile.

# However, the Sweave document processing 'hung' at 6% done...
# When I cancelled the operation, I did get a tex file, and when this was processed, I ended up with 

[[IMAGE DISCARDED DUE TO '/tikz/external/mode=list and make']]

# Contents of the log: attached.


More information about the Tikzdevice-bugs mailing list