url_exists.RdFunction to check if URL exists
url_exists(x, non_2xx_return_value = FALSE, quiet = FALSE, ...)
| x | a single URL |
|---|---|
| non_2xx_return_value | what to do if the site exists but the
HTTP status code is not in the |
| quiet | if not |
| ... | other params ( |
return TRUE or FALSE
urls <- c('http://www.amazon.com', 'http://this.isafakelink.biz', 'https://stackoverflow.com') base::sapply(urls,url_exists)#> http://www.amazon.com http://this.isafakelink.biz #> TRUE FALSE #> https://stackoverflow.com #> TRUE