ch_test_url_file: Tests url to see if it will work

View source: R/utils.R

ch_test_url_fileR Documentation

Tests url to see if it will work

Description

Tests url to see if it will work

Usage

ch_test_url_file(url, quiet = FALSE)

Arguments

url

Required. URL to be checked

quiet

Optional. If FALSE (the default) messages are printed.

Value

Returns error if there was an error, warning if there was a warning. Otherwise, returns OK. Strings are returned instead of logical values to simplify checking result in calling function.

Author(s)

Kevin Shook

See Also

See original code on post in Stack Overflow How to write trycatch in R

Examples


# Not tested automatically as can be very slow
test_url <- "https://zenodo.org/record/4781469/files/sm_data.csv"
ch_test_url_file(test_url, quiet = TRUE)



CSHS-hydRology/CSHShydRology documentation built on Aug. 18, 2022, 4:44 p.m.