Re: [Rd] Cross-platform check for internet connection

From: hadley wickham <h.wickham_at_gmail.com>
Date: Fri, 22 Jun 2007 13:46:17 +0200

On 6/22/07, Prof Brian Ripley <ripley_at_stats.ox.ac.uk> wrote:
> On Fri, 22 Jun 2007, hadley wickham wrote:
>
> > What's the recommended way to check if an internet connection is
> > available across platforms? I was using is.null(nsl()) but this does
> > not work on windows.
>
> I don't know a way to do this on Windows without a possible very long
> hang. It's complicated by the use of two alternative internet connection
> mechanisms on Windows and having little control over the IE-based one.
>
> Another issue is software firewalls: they can take many minutes to
> decide to let a new program talk to the Internet if they 'call home' to
> ask advice.

Thanks for those details, I hadn't considered the problems that might be associated with firewalls.

To give a little more context, I have an example in one of my packages which downloads some data off the web. I don't really want to include the data in my package, since it's not my data (although I'm fairly certain I could get permission to include it).

So really it doesn't matter if there will be a long delay, provided that there won't be a long delay for the windows CRAN server. I could wrap the entire example in dontrun, but then that loses the useful checking I get locally when running r cmd check.

Are there any other solutions?

Thanks,

Hadley



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 22 Jun 2007 - 12:19:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 22 Jun 2007 - 16:35:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.