I would like to create a script in R that pings a given website. I haven\'t found any information about this specific for R.
To start with, all I need is the informa
RCurl::url.exists works for localhost (where ping doesn't always) and is faster than RCurl::getURL.
> library(RCurl)
> url.exists("google.com")
[1] TRUE
> url.exists("localhost:8888")
[1] TRUE
> url.exists("localhost:8012")
[1] FALSE
Note that it is possible to set the timeout (which by default is rather long)
> url.exists("google.com", timeout = 5) # timeout in seconds
[1] TRUE