Function for downloading & testing url/internet connection according to CRAN policy Example solution strongly based on https://community.rstudio.com/t/internet-resources-should-fail-gracefully/49199/12 as suggested by kvasilopoulos
test_url(link, output, quiet = FALSE)
No return value, called for side effects to check for internet connection
# \donttest{
link = "http://httpbin.org/status/200"
output = tempfile()
test_url(link = link, output = output)
#> /tmp/RtmpQGk12W/file1be4703134f5
# }