check-vector-isExistingUrl | R Documentation |
Does the input contain an existing (active) URL?
isExistingUrl(x)
isAnExistingUrl(x)
allAreExistingUrls(x)
x |
Object. |
Supports HTTPS, HTTP, and FTP protocols.
TRUE
on success;
FALSE
on failure, with cause set.
isExistingUrl()
: Vectorized.
isAnExistingUrl()
: Scalar. Requires a single URL.
allAreExistingUrls()
: Scalar. Checks that all strings are
existing URLs.
Updated 2023-10-02.
curlGetHeaders()
: Amazing function with good timeout control.
open.connection()
: Base method with no dependencies, but prone to hang
with poor timeout control.
RCurl::url.exists()
: Seems to be good but adds external dependency.
urlchecker and curl packages.
https://github.com/r-lib/urlchecker/blob/main/inst/tools/urltools.R
https://stackoverflow.com/questions/52911812
https://stackoverflow.com/a/17620732/3911732
## TRUE ====
isAnExistingUrl("https://acidgenomics.com/")
## FALSE ====
isAnExistingUrl("https://failwhale.acidgenomics.com/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.