Re: [R] Test internet presence

From: Gregor Gorjanc <gregor.gorjanc_at_bfro.uni-lj.si>
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 www.google.com", 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.

[1]https://stat.ethz.ch/pipermail/r-help/2006-September/112766.html

Thank you!

-- 
Lep pozdrav / With regards,
    Gregor Gorjanc

----------------------------------------------------------------------
University of Ljubljana     PhD student
Biotechnical Faculty
Zootechnical Department     URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3                   mail: gregor.gorjanc <at> bfro.uni-lj.si

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.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.