Jens Oehlschlägel
2000-Dec-20 12:42 UTC
[Rd] showConnections() does not show closed (or non-opened) connections though help says so
help on showConnections explains parameter all logical: if true all connections, including closed ones and the standard ones are displayed. If false only open user-created connections are included. but> # create a file > cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file="ex.data",+ sep="\n")> showConnections(all=TRUE)class description 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"> > con <- file("ex.data") > showConnections(all=TRUE)class description 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"> # here the connection (existing? but not-opened) is not listend > > open(con) > showConnections(all=TRUE)class description 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 "ex.data" "file" "r" "text" "opened" "yes" "no"> > close(con) > showConnections(all=TRUE)class description 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"> > readLines("ex.data", n=-1)[1] "TITLE extra line" "2 3 5 7" "" "11 13 17"> showConnections(all=TRUE)class description 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"> # here we don't know whether showConnections() does not show a connection created and opened by readLine() > # or whether readLines() did also close the connectionRegards Jens Oehlschlägel --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = x86 os = Win32 system = x86, Win32 status = major = 1 minor = 2.0 year = 2000 month = 12 day = 15 language = R Windows NT 4.0 (build 1381) Service Pack 6 Search Path: .GlobalEnv, package:ctest, Autoloads, package:base ______________________________________________________________________________ Die Fachpresse ist sich einig: WEB.DE 15mal Testsieger! Kostenlos E-Mail, Fax, SMS, Verschlüsselung, POP3, WAP....testen Sie uns! http://freemail.web.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley
2000-Dec-20 12:51 UTC
[Rd] showConnections() does not show closed (or non-opened) connections though help says so
Why am I getting two copies of lots of reports from you? -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Reasonably Related Threads
- showConnections() does not show closed (or non-opened) connections though help says so (PR#784)
- unlink() is not synchronized with existing connections
- unlink() is not synchronized with existing connections (PR#783)
- bug in closing gzfile-opened connections?
- unlink() is not synchronized with existing connections (PR#785)