Re: [Rd] isOpen on closed connections

2007-11-15 Thread Henrik Bengtsson
My solution the original post is to always set 'con - NULL' after closing a connection, and then test for NULL. This is how I do to make sure to make sure that opened connections are closed and as soon as possible. foo - function(...) { con - file(foo.R, open=r): on.exit({ if

Re: [Rd] isOpen on closed connections

2007-11-15 Thread Roger D. Peng
Upon further consideration, I realized there is a philosophical element here---if a connection is closed and hence does not exist, is it open? The practical issue for me is that when you do something like close(con) the 'con' object is still lying around and is essentially undefined. For

Re: [Rd] isOpen on closed connections

2007-11-15 Thread Mark.Bravington
November 2007 11:48 PM To: Prof Brian Ripley Cc: R-devel mailing list Subject: Re: [Rd] isOpen on closed connections Upon further consideration, I realized there is a philosophical element here---if a connection is closed and hence does not exist, is it open? The practical issue for me

[Rd] isOpen on closed connections

2007-11-14 Thread Roger D. Peng
As far as I can tell, 'isOpen' cannot return FALSE in the case when 'rw = '. If the connection has already been closed by 'close' or some other function, then isOpen will produce an error. The problem is that when isOpen calls 'getConnection', the connection cannot be found and 'getConnection'

Re: [Rd] isOpen on closed connections

2007-11-14 Thread Seth Falcon
Roger D. Peng [EMAIL PROTECTED] writes: As far as I can tell, 'isOpen' cannot return FALSE in the case when 'rw = '. If the connection has already been closed by 'close' or some other function, then isOpen will produce an error. The problem is that when isOpen calls 'getConnection', the