Author: lasgouttes
Date: Tue May 31 12:44:11 2011
New Revision: 38896
URL: http://www.lyx.org/trac/changeset/38896
Log:
Fix bug #7552: Use of expression() in plot R command fails
This is dur to the use of the null device, which causes problems. Note that, as
a consequence, a Rplots.pdf file is created in the document directory.
Modified:
lyx-devel/trunk/lib/scripts/lyxsweave.R
Modified: lyx-devel/trunk/lib/scripts/lyxsweave.R
==============================================================================
--- lyx-devel/trunk/lib/scripts/lyxsweave.R Tue May 31 12:37:09 2011
(r38895)
+++ lyx-devel/trunk/lib/scripts/lyxsweave.R Tue May 31 12:44:11 2011
(r38896)
@@ -32,10 +32,6 @@
# this is passed as a prefix.string to tell where temporary files should go
ls.pr <- gsub('\\.([^/]*)$', '-\\1', sub("\\.tex$", "", ls.args[2]))
-# Replace the default pdf device by the null device (tip from Yihui Xie)
-# See:
http://yihui.name/en/2010/12/a-special-graphics-device-in-r-the-null-device/
-.Call("R_GD_nullDevice", PACKAGE = "grDevices")
-
# finally run sweave
Sweave(file=ls.args[1], output=ls.args[2], syntax="SweaveSyntaxNoweb",
stylepath=ls.sp, prefix.string=ls.pr)