[R] close connection, closeAllConnections()

mel mel at altk.com
Wed Jan 9 16:21:02 CET 2008

close connection, closeAllConnections()


For windows2000 and windowsXP, R.2.6.1
I have a little problem with the following lines

 > socketConnection('', port=7496, server=F, blocking=F, 
open='wb', encoding='');
        description              class               mode 
text             opened           can read
"->"           "socket"               "wb" 
"binary"           "opened"              "yes"
          can write
 > showConnections(all=TRUE)
   description        class      mode text     isopen   can read can write
0 "stdin"            "terminal" "r"  "text"   "opened" "yes"    "no"
1 "stdout"           "terminal" "w"  "text"   "opened" "no"     "yes"
2 "stderr"           "terminal" "w"  "text"   "opened" "no"     "yes"
3 "->" "socket"   "wb" "binary" "opened" "yes"    "yes"
 > closeAllConnections()
Erreur dans close.socket(getConnection(set[i])) : invalid 'socket'

with the previous R version,
calling closeAllConnections() did nicely close connection #3
... but now, this works no more.

I'm missing something and would be very thankful for any
infos/pointer about this little worry.
(I believe some changes were planned with the connection functions
in R.2.6.1, could it be that ?)

More information about the R-help mailing list