[Distr-commits] r324 - branches/distr-2.1/pkg/distr/R pkg/distr/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Oct 30 14:41:40 CET 2008


Author: ruckdeschel
Date: 2008-10-30 14:41:40 +0100 (Thu, 30 Oct 2008)
New Revision: 324

Modified:
   branches/distr-2.1/pkg/distr/R/0pre270.R
   pkg/distr/R/0pre270.R
Log:
changed devNew to only open a device if length(dev.list())>0

Modified: branches/distr-2.1/pkg/distr/R/0pre270.R
===================================================================
--- branches/distr-2.1/pkg/distr/R/0pre270.R	2008-10-30 10:52:26 UTC (rev 323)
+++ branches/distr-2.1/pkg/distr/R/0pre270.R	2008-10-30 13:41:40 UTC (rev 324)
@@ -1,11 +1,13 @@
 ### for working under R < 2.8.0
 if(getRversion()<'2.8.0'){
     devNew <- function(...){
+        if(length(dev.list())>0)
         get(getOption("device"))(...)
     }
 }else{
     devNew <- function(...){
-        dev.new(...)
+        if(length(dev.list())>0)
+           dev.new(...)
     }
 }
 

Modified: pkg/distr/R/0pre270.R
===================================================================
--- pkg/distr/R/0pre270.R	2008-10-30 10:52:26 UTC (rev 323)
+++ pkg/distr/R/0pre270.R	2008-10-30 13:41:40 UTC (rev 324)
@@ -1,11 +1,13 @@
 ### for working under R < 2.8.0
 if(getRversion()<'2.8.0'){
     devNew <- function(...){
+        if(length(dev.list())>0)
         get(getOption("device"))(...)
     }
 }else{
     devNew <- function(...){
-        dev.new(...)
+        if(length(dev.list())>0)
+           dev.new(...)
     }
 }
 



More information about the Distr-commits mailing list