SCM

[#2608] GenABEL-package loads too long if there is no internet connection

Date:
2013-03-12 08:14
Priority:
2
State:
Open
Submitted by:
Yurii Aulchenko (yurii)
Assigned to:
Nobody (None)
Resolution:
None
Operating System:
None
Severity:
trivial
Hardware:
None
Version:
None
Component:
GenABEL
URL:
Summary:
GenABEL-package loads too long if there is no internet connection

Detailed description
Try loading the GenA-package ('library(GenABEL)") in R with and without internet connection. There is a clear difference. This is something to do with the (multiple???) 'timeout' argument - probably need to do quicker.

Comments:

Message  ↓
Date: 2013-12-02 08:26
Sender: Lennart Karssen

Maybe we can also add an option that allows the users to bypass the check completely. For example by setting an option in their ~/.Rprofile file like this:

options(GenABEL.update.check = FALSE)

Date: 2013-11-30 09:30
Sender: Maksim Struchalin

I studied this problem a bit today. The delay is caused by R function readLines() in the .onAttach() function from file R/zzz.R. This function tries to read from a site without (!) checking whether this site is opened sucessfuly by function 'url()'. If there is no internet connection, then the readLines() get stuck for 20 seconds and return "try-error" (through try()). There are 3 calls of readLines() that should cause a total delay of 60 sec.

I see two possible solutions:
1) Use R package "RCurl" which provide more complex instruments for work with internet (hopefuly it will solve the problem). But, unfortunatelly, I can not install it.
2) Try to 'ping' sites and see response. In this case, we check out whether sites are responding to our ping request and then read from those which reacted on our ping. It should work on win/max/linux as all of them have 'ping' system function. Disadvantages: This apporoach will not work if the site's mainteners will forbid ping response.

Date: 2013-03-12 09:23
Sender: Yurii Aulchenko

starting point:
function '.onAttach' in GenABEL/R/zzz.R

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge