Hi,
I am making multiple calls to gzfile() via read.table(), e.g.

> x <- read.table( gzfile( "xxx.gz" ) )

After i do this many times (I haven't counted, but probably between 50 and
100 times) I get the error message:

Error in open.connection(file, "r") : unable to open connection
In addition: Warning message:
cannot open compressed file 'xxx.gz'

however, I also find that:

> showConnections()
     description class mode text isopen can read can write

so there are no (apparently) open connections. Calling closeAllConnections()
does not fix the problem. I have to quit and re-start R.
I am using R 2.5.0 on a Mac (OSX 10.4.9).

Anyone know if this is a bug or a 'feature'? I see from the gzfile help
that:

 In general functions using connections
     will open them if they are not open, but then close them again, so
     to leave a connection open call 'open' explicitly.

Thanks.
-David

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to