From Martin.Schlather@uni-bayreuth.de  Mon Aug  5 21:35:04 2002
From: Martin.Schlather@uni-bayreuth.de (Martin.Schlather@uni-bayreuth.de)
Date: Mon, 5 Aug 2002 22:35:04 +0200 (MET DST)
Subject: close.screen (PR#1878)
Message-ID: <200208052035.WAA18783@pubhealth.ku.dk>

Full_Name: Martin Schlather
Version: 1.5.1
OS: Linux
Submission from: (NULL) (132.180.72.150)


Hi,

As a user it is not obvious to me why
"close.screen" should return a warning message in 

split.screen(figs=c(1,2))
i <- 2  
screen(i)
close.screen(i)

whereas no warning message appears for i <- 1.


In fact, the warning message appears since the condition
   .split.valid.screens >  temp
in close.screen is not satisfied by any element of .split.valid.screens

Replacing 

   if (temp %in% n) 
       temp <- min(.split.valid.screens[.split.valid.screens > 
           temp])
   if (temp > max(.split.valid.screens)) 
       temp <- min(.split.valid.screens)

by

   if (temp > max(.split.valid.screens)) 
      temp <- min(.split.valid.screens)
   else
      if (temp %in% n) 
         temp <- min(.split.valid.screens[.split.valid.screens > 
             temp])

should avoid the warning message without any other changings in the
functionality of close.screen.

Cheers,
Martin




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


close.screen (PR#1878)
Martin.Schlather@uni-bayreuth.de