Date: 2013-11-30 09:30 Sender: Maksim StruchalinI 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.
|