[R] Closing binary file connections

Sven Garbade garbade at psy.uni-muenchen.de
Thu Jan 10 13:02:11 CET 2002


Prof Brian Ripley wrote:
> 
> On Thu, 10 Jan 2002, Sven Garbade wrote:
> 
> > Hi all,
> >
> > I'm writing a function that read data from a binary file. I want to
> > close all opened connections, but it failed:
> >
> > > showConnections()
> >    description        class  mode text     isopen   can read can write
> > 3  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 4  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 5  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 6  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 7  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 8  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 9  "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 10 "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 11 "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 12 "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > 13 "daten/t5_all.mea" "file" "rb" "binary" "opened" "yes"    "no"
> > > closeAllConnections()
> > Error in close(set[i]) : no applicable method for "close"
> > In addition: Warning message:
> > no sink to remove
> >
> > What does this mean?
> 
> Which version of R is this?  From the NEWS for 1.4.0:
> 
>     o   closeAllConnections() works again, and closes all sink() diversions.
> 
> You can always close them individually with close()

It's not the current version (I think deb packages aren't avaiable for
Debian stable and I haven't found the time for self compiling):

platform i386-pc-linux-gnu
arch     i386             
os       linux-gnu        
system   i386, linux-gnu  
status                    
major    1                
minor    3.1              
year     2001             
month    08               
day      31               
language R        

So it sound that's a problem of version 1.3.1, fixed in 1.4.0.

Thanks, Sven
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list