Re: [R] Test internet presence

From: Gregor Gorjanc <>
Date: Tue 12 Sep 2006 - 13:34:39 GMT

Gabor Grothendieck wrote:
> Here is a variation for Windows. The second line returns TRUE or FALSE
> and may need to be varied if the output of ping is not the same on your
> system as on mine:
> ping <- system("ping", intern = TRUE)
> as.numeric(strsplit(grep("Received", ping, value = TRUE), "[
> ,]")[[1]][8]) > 0


Thank you Gabor and Ted! These are all fine ways, but as both of you have stated not really general as you never know what ping will produce on different versions etc. I am really keen on test from tests/internet.R. If that test is OK for base R, I do not see why it should not be OK for R package. I just hope to get some more feedback on my question[1] to prof. Ripley.


Thank you!

Lep pozdrav / With regards,
    Gregor Gorjanc

University of Ljubljana     PhD student
Biotechnical Faculty
Zootechnical Department     URI:
Groblje 3                   mail: gregor.gorjanc <at>

SI-1230 Domzale             tel: +386 (0)1 72 17 861
Slovenia, Europe            fax: +386 (0)1 72 17 888

"One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try." Sophocles ~ 450 B.C.

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue Sep 12 23:39:09 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 12 Sep 2006 - 14:30:04 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.