k.ponting at aurix.com
2006-Nov-02 10:51 UTC
[Rd] CRAN task views work only once per session (PR#9330)
Cran task views seems to be a "once-per-session" process -- the first attempt to access views in a (RGui for Windows) session works, but subsequent attempts fail. There is a noticeably long pause before the failing call returns. Example session with two calls to "available.views" follows, but similar effects have been observed with two calls to "install.views" and even a call to "available.views" followed by a call to "install.views". R version 2.4.0 (2006-10-03) Copyright (C) 2006 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.> sessionInfo()R version 2.4.0 (2006-10-03) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"> available.views(repos="http://cran.uk.r-project.org")Error: could not find function "available.views"> library(ctv) > available.views(repos="http://cran.uk.r-project.org")CRAN Task Views --------------- Name: Bayesian Topic: Bayesian Inference Maintainer: Jong Hee Park Repository: http://cran.uk.r-project.org --------------- Name: Cluster Topic: Cluster Analysis & Finite Mixture Models Maintainer: Friedrich Leisch and Bettina Gruen Repository: http://cran.uk.r-project.org --------------- Name: Econometrics Topic: Computational Econometrics Maintainer: Achim Zeileis Repository: http://cran.uk.r-project.org --------------- Name: Environmetrics Topic: Analysis of ecological and environmental data Maintainer: Gavin Simpson Repository: http://cran.uk.r-project.org --------------- Name: Finance Topic: Empirical Finance Maintainer: Dirk Eddelbuettel Repository: http://cran.uk.r-project.org --------------- Name: Genetics Topic: Statistical Genetics Maintainer: Giovanni Montana Repository: http://cran.uk.r-project.org --------------- Name: Graphics Topic: Graphic Displays & Dynamic Graphics & Graphic Devices & Visualization Maintainer: Nicholas Lewin-Koh Repository: http://cran.uk.r-project.org --------------- Name: MachineLearning Topic: Machine Learning & Statistical Learning Maintainer: Torsten Hothorn Repository: http://cran.uk.r-project.org --------------- Name: Multivariate Topic: Multivariate Statistics Maintainer: Paul Hewson Repository: http://cran.uk.r-project.org --------------- Name: SocialSciences Topic: Statistics for the Social Sciences Maintainer: John Fox Repository: http://cran.uk.r-project.org --------------- Name: Spatial Topic: Analysis of Spatial Data Maintainer: Roger Bivand Repository: http://cran.uk.r-project.org --------------- Name: gR Topic: gRaphical models in R Maintainer: Claus Dethlefsen Repository: http://cran.uk.r-project.org> available.views(repos="http://cran.uk.r-project.org")CRAN Task Views no views found>--please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = major = 2 minor = 4.0 year = 2006 month = 10 day = 03 svn rev = 39566 language = R version.string = R version 2.4.0 (2006-10-03) Windows XP Professional (build 2600) Service Pack 2.0 Locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 Search Path: .GlobalEnv, package:ctv, package:methods, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, Autoloads, package:base ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information visit http://www.virtual-email.net/messagelabs.htm
Achim Zeileis
2006-Nov-02 12:39 UTC
[Rd] CRAN task views work only once per session (PR#9330)
One comment - taken from the FAQ - in advance: Bug reports on contributed packages should be sent first to the package maintainer, and only submitted to the R-bugs repository by package maintainers, mentioning the package in the subject line. In this case, posting to R-devel (but not R-bugs) and Cc to me (as the maintainer of ctv) would also have been ok. As for your problem: On my Linux machine, the code library("ctv") x <- available.views(repos = "http://CRAN.uk.R-project.org") y <- available.views(repos = "http://CRAN.uk.R-project.org") runs without any problem, x and y are also identical afterwards. As I haven't got a Windows XP machine, could someone on the list please run the code above and confirm (or disconfirm) that the second call takes longer and finally finds no views. thx in advance, Z
Keith Ponting
2006-Nov-06 11:23 UTC
[Rd] CRAN task views work only once per session (PR#9330)
Thankyou to those who have replied to this thread. I have now reproduced similar effects in a way which does not directly involve CRAN task views. (I have also reproduced the original problem on a different machine within our site and using a different mirror.) The following sequence of commands works repeatedly within plain Rterm (actually running under XEmacs) on Windows XP: x<-url("http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds",open="rb" ); showConnections() .readRDS(x); showConnections() close(x) showConnections() However under RGui on the same system, second and subsequent attempts time out in .readRDS (see session log below) and note that although the connection is shown as open immediately before the second .readRDS call, it is shown as closed immediately after that (failing) call. I wonder whether something in RGui is holding on to connections after they have been closed. Even while .readRDS is timing out in one RGui session, I can run that sequence of calls in plain Rterm or (once!) in another RGui session without problems, which I hope eliminates the possibility that it is our company firewall or something else on my PC holding on to the connection in some way. ---------- session log starts ------------------------------------------------ R version 2.4.0 (2006-10-03) Copyright (C) 2006 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.>x<-url("http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds",open="rb" );> showConnections()description class mode text 3 "http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds" "url" "rb" "binary" isopen can read can write 3 "opened" "yes" "no"> .readRDS(x); > showConnections()description class mode 3 "gzcon(http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds)" "gzcon" "rb" text isopen can read can write 3 "binary" "opened" "yes" "no"> close(x) > showConnections()description class mode text isopen can read can write>x<-url("http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds",open="rb" );> showConnections()description class mode text 3 "http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds" "url" "rb" "binary" isopen can read can write 3 "opened" "yes" "no"> .readRDS(x);Error in .readRDS(x) : connection is not open In addition: Warning message: InternetOpenUrl failed: 'The operation timed out'> showConnections()description class mode text isopen can read can write> close(x) > showConnections()description class mode text isopen can read can write>x<-url("http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds",open="rb" );> showConnections()description class mode text 3 "http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds" "url" "rb" "binary" isopen can read can write 3 "opened" "yes" "no"> .readRDS(x);Error in .readRDS(x) : connection is not open In addition: Warning message: InternetOpenUrl failed: 'The operation timed out'> showConnections()description class mode text isopen can read can write> close(x) > showConnections()description class mode text isopen can read can write> > sessionInfo()R version 2.4.0 (2006-10-03) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base">---------- session log ends ------------------------------------------------ If I remove the .readRDS(x) call, there is no problem - the following command sequence does work repeatedly: x<-url("http://www.sourcekeg.co.uk/cran/src/contrib/Views.rds",open="rb" ); showConnections() close(x) showConnections() Dr. Keith Ponting Principal Scientist Aurix Ltd Malvern Hills Science Park Geraldine Rd Malvern Worcestershire WR14 3SZ UK ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information visit http://www.virtual-email.net/messagelabs.htm
Keith Ponting
2006-Nov-06 12:54 UTC
[Rd] CRAN task views work only once per session (PR#9330)
> -----Original Message----- > From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] > Sent: 06 November 2006 11:42 > To: Keith Ponting > Cc: r-devel at r-project.org > Subject: Re: [Rd] CRAN task views work only once per session (PR#9330) > > I think the following item in NEWS for R-patched may be relevant: > > o load()ing from a connection had a logic bug in when it closed > the connection. (PR#9271) > > so please try R-patched.R-patched runs the offending code repeatedly without complaint (and my original problem with ctv available.views is also solved) so I will look forward to the next release. Thankyou for your time (and to you and all responsible for R itself!). Keith Ponting ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information visit http://www.virtual-email.net/messagelabs.htm
Maybe Matching Threads
- PATCH: Asserting that 'connection' used has not changed + R_GetConnection2()
- file descriptor leak in getSrcLines in R 2.10.0 svn 48590
- cannot destroy connection (?) created by readLines in a tryCatch
- cannot destroy connection (?) created by readLines in a tryCatch
- download.file does not process gz files correctly (truncates them?)