isConnected | R Documentation |
Function to (heuristically) test for a network connection by attempting to connect to a given website.
isConnected(site = "https://www.google.com")
site |
Character variable with site to try to connect to,
defauls to |
The main page of Google is used as a proxy for overall network connectivity as Google is generally 'network-close' and the page is relatively small. If a network is unavailable this fails generally already on domain name service resolution. Special thanks to Barry and Brodie for a very helpful discussion re-discovering this function.
A boolean value indicating networking status
Dirk Eddelbuettel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.