From jorismeys at gmail.com  Fri Apr  8 16:56:16 2011
From: jorismeys at gmail.com (Joris Meys)
Date: Fri, 8 Apr 2011 16:56:16 +0200
Subject: [Rd] Invalid connection after closing?
Message-ID: <BANLkTin3MO-f_dLz4RnCRnj_EXP-Bd=c3Q@mail.gmail.com>

Dear all,

I do not completely understand following behaviour :

> con <- file("test.txt")
> isOpen(con)
[1] FALSE
> open(con)
> isOpen(con)
[1] TRUE
> close(con)
> isOpen(con)
Error in isOpen(con) : invalid connection
> str(con)
Classes 'file', 'connection'  atomic [1:1] 3
  ..- attr(*, "conn_id")=<externalptr>

Why do I get an error, indicating an invalid connection, after I
closed a connection? Is this to be expected?
Cheers
Joris

-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php



[Rd] Invalid connection after closing?
Joris Meys