isConnected: Is the current session (networked) and connected?

Description Usage Arguments Details Value Author(s)

View source: R/connection.R

Description

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

Usage

1
isConnected(site = "https://opentdb.com/")

Arguments

site

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

Details

This function was kindly provided by Dirk Eddelbuettel as part of this SO answer (https://stackoverflow.com/questions/66773611/cran-example-fails-if-run-offline-talks-to-external-api). It is copied here to avoid the 'dang' dependency.

Value

A boolean value indicating networking status

Author(s)

Dirk Eddelbuettel


condwanaland/triviaq documentation built on Dec. 19, 2021, 6:01 p.m.