Learn R Programming

countries (version 1.2.0)

check_countries_api: Check if the connection to Countries REST API is working

Description

Check if the connection to REST Countries API is working. The function checks if the user has an internet connection and if any answer is returned from the Countries REST API.

Usage

check_countries_api(warnings = TRUE, timeout = 4)

Value

Returns a logical value: TRUE if there is a connection, FALSE if there is no connection.

Arguments

warnings

Logical value indicating whether to output a warning when there is no connection. Default is TRUE.

timeout

Numeric value giving the timeout in seconds for attempting connection to the API. Default is 4 second.

See Also

list_fields, country_info

Examples

Run this code
check_countries_api()

Run the code above in your browser using DataLab