check-vector-isExistingUrl: Does the input contain an existing (active) URL?

check-vector-isExistingUrlR Documentation

Does the input contain an existing (active) URL?

Description

Does the input contain an existing (active) URL?

Usage

isExistingUrl(x)

isAnExistingUrl(x)

allAreExistingUrls(x)

Arguments

x

Object.

Details

Supports HTTPS, HTTP, and FTP protocols.

Value

TRUE on success; FALSE on failure, with cause set.

Functions

  • isExistingUrl(): Vectorized.

  • isAnExistingUrl(): Scalar. Requires a single URL.

  • allAreExistingUrls(): Scalar. Checks that all strings are existing URLs.

Note

Updated 2023-10-02.

See Also

  • 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

Examples

## TRUE ====
isAnExistingUrl("https://acidgenomics.com/")

## FALSE ====
isAnExistingUrl("https://failwhale.acidgenomics.com/")

acidgenomics/r-goalie documentation built on Jan. 12, 2024, 4:15 a.m.