From p.c.j.kleiweg at rug.nl  Sun Apr 27 14:10:07 2008
From: p.c.j.kleiweg at rug.nl (p.c.j.kleiweg at rug.nl)
Date: Sun, 27 Apr 2008 14:10:07 +0200 (CEST)
Subject: [Rd] R_DEFAULT_DEVICE (PR#11294)
Message-ID: <20080427121007.D3AB1283460E@mail.pubhealth.ku.dk>


Setting enviroment variable R_DEFAULT_DEVICE causes an error. 
The patch below fixes this.

I guess the same goes for R_INTERACTIVE_DEVICE.


--- R-2.7.0/src/library/grDevices/R/zzz.R       2008-04-27 13:49:11.000000000 +0200
+++ R-2.7.0/src/library/grDevices/R/zzz.R.new   2008-04-27 13:59:37.000000000 +0200
@@ -22,7 +22,7 @@
     extras <- if(.Platform$OS.type == "windows")
         list(windowsTimeouts = c(100L,500L)) else
     list(bitmapType = if(capabilities("aqua")) "quartz" else if(capabilities("cairo")) "cairo" else "Xlib")
-    defdev <- Sys.getenv("R_DEFAULT_DEVICE")
+    defdev <- as.character(Sys.getenv("R_DEFAULT_DEVICE"))
     if(!nzchar(defdev)) defdev <- "pdf"
     device <- if(interactive()) {
         intdev <- Sys.getenv("R_INTERACTIVE_DEVICE")




--please do not edit the information below--

Version:
 platform = i686-pc-linux-gnu
 arch = i686
 os = linux-gnu
 system = i686, linux-gnu
 status = 
 major = 2
 minor = 7.0
 year = 2008
 month = 04
 day = 22
 svn rev = 45424
 language = R
 version.string = R version 2.7.0 (2008-04-22)

Locale:
LC_CTYPE=nl_NL at euro;LC_NUMERIC=C;LC_TIME=nl_NL at euro;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=nl_NL at euro;LC_PAPER=nl_NL at euro;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=nl_NL at euro;LC_IDENTIFICATION=C

Search Path:
 .GlobalEnv, package:stats, package:graphics, package:utils, package:datasets, package:grDevices, package:methods, Autoloads, package:base



[Rd] R_DEFAULT_DEVICE (PR#11294)
p.c.j.kleiweg at rug.nl