I'm following Gregor Gorjanc's tutorial on LyX & Sweave. Using Ubuntu 10.04 and LyX
version 1.6.5 with all of texlive-full
installed.
R
scraps which result in numerical output produce a valid PDF.
But, when I try to compile simple figures like
<<chunk, fig=T>>= [ctrl+enter]
hist(rnorm(100)) [ctrl+enter]
@
I get cryptic errors. Either that chunk.temp.Rnw
wasn't found, or that LaTeX
encountered an error and I should hit <enter>
to ignore.
If I change fig
to figure
and T
to TRUE
, then the LyX
document compiles but displays no graphics. With pgfsweave
I get this error, or sometimes this one.
Am I working with the wrong versions of these programs? Is there a way to elicit better error messages? Can I somehow dive into the LaTeX prompt and hit <enter>
myself?
update: I was using the wrong version of LaTeX
; Ubuntu's default is too old. Also I needed to update to LyX 2.0.1
and a newer version of pgf
and pgfSweave
(the programs are distinct).
The new (nondescript) error message is: An error occurred while running: Rscript '/home/mars/.lyx/scripts/lyx-sweave-exec.R' 'UTF-8' 'pgfSweave' "/home/mars/" "/tmp/lyx_tmpdir.T1663/lyx_tmpbuf2/" "test.sweave.lyx.Rnw" > "test.sweave.Rnw".log 2>&1