Dear all
I've just tried the brand new 'grdevice' option in Sweave but couldn't
make it work. When I declare
\SweaveOpts{grdevice=pdf}
or
\SweaveOpts{grdevice=cairo_pdf}
trying to plot something simple
<<fig=T, echo=T>>=
plot(1:10,1:10,main='Some title')
@
would result in an Sweave error:
18:16:47.299: 1 : term verbatim
18:16:47.308: 2 : echo term verbatim pdf pdf
18:16:47.391: Error in dev(name = chunkprefix, width = options$width,
height = options$height, :
18:16:47.392: unused argument(s) (name = chunkprefix)
18:16:47.393: Calls: Sweave -> <Anonymous> -> dev
18:16:47.396: Execution halted
Systemcall.cpp(238): Systemcall: 'Rscript --verbose --no-save
--no-restore "/usr/local/share/lyx-svn/scripts/lyxsweave.R"
"/tmp/lyx_tmpdir.J15281/lyx_tmpbuf5/""newfile2.Rnw"
"/tmp/lyx_tmpdir.J15281/lyx_tmpbuf5/""newfile2.tex" ISO-8859-15
"/tmp/"' finished with exit code 1
Error: Cannot convert file
----------------------------------------
An error occurred while running:
Rscript --verbose --no-save --no-restore
"/usr/local/share/lyx-svn/scripts/lyxsweave.R"
"/tmp/lyx_tmpdir.J15281/lyx_tmpbuf5/""newfile2.Rnw"
"/tmp/lyx_tmpdir.J15281/lyx_tmpbuf5/""newfile2.tex" ISO-8859-15 "/tmp/"
18:16:47.978: Error while previewing format: pdf2
If I comment out the statement
%\SweaveOpts{grdevice=pdf}
the compilation proceeds as expected. Hoping that it gets through, I'm
attaching the Sweave file. Am I doing something wrong?