[R] Test internet presence
gregor.gorjanc at bfro.uni-lj.si
Tue Sep 12 00:49:10 CEST 2006
Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes:
> Check out tests/internet.R. nsl() checks if you can resolve host names,
> which has worked well enough there.
Thank you prof. Ripley for this pointer. I am posting here the relevant part if
someone does not look at SVN. I would just like to ask why is .Platform$OS.type
== "unix" added to the test? Is nsl() available only on unix like platforms or
... I did not found any specifics in its help page.
warning("no internet capabilities")
if(.Platform$OS.type == "unix" &&
Does it make any sense to write a function that would use these two tests.
isNetAvailable <- function()
## .Platform$OS.type == "unix" && ## ???
More information about the R-help