***NOTE: THIS IS A PRELIMINARY VERSION OF THIS FUNCTION; ***NOTE: IT MAY BE CHANGED OR REMOVED IN A FUTURE RELEASE.
ping a Uniform resource locator (URL) or Internet Protocol (IP) address.
NOTE: Some Internet Service Providers (ISPs)
play games with "ping". That makes the results
of Ping
unreliable.
Ping(url, pingArgs='', warn=NA,
show.output.on.console=FALSE)
list with the following components:
character vector of the raw results from the ping command
numeric vector of the times measured
numeric vector of numbers of packets sent, received, and lost
proportion lost = lost / sent
numeric vector of min, avg (mean), max,
and mdev
(standard deviation) of the
measured round trip times
a character string of a URL or IP address to
ping. If url
is a vector of length
greater than 1, only the first component is
used.
arguments to pass to the ping
command
of typical operating systems via
pingResult <- system(paste('ping',
pingArgs, url), intern=TRUE, ...)
value for options('warn')
during the
call to system
. NA
to
not change options('warn')
during
this call.
argument for system
.
Spencer Graves
1. urlSplit0 <- strsplit(url, '://')[[1]]
2. urlS0 <- urlSplit0[min(2,
length(urlSplit0))]
3. host <- strsplit(urlS0, '/')[[1]][1]
4. pingCmd <- paste('ping', pingArgs,
host)
5. system(pingCmd, intern=TRUE, ...)