isConnected {dang}R Documentation

Is the current session (networked) and connected?

Description

Function to (heuristically) test for a network connection by attempting to connect to a given website.

Usage

isConnected(site = "https://www.google.com")

Arguments

site

Character variable with site to try to connect to, defauls to http://www.google.com

Details

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.

Value

A boolean value indicating networking status

Author(s)

Dirk Eddelbuettel


[Package dang version 0.0.15 Index]