Skip to contents

Is it a URL?

Usage

is_url(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for an http/https/ftp URL with a dotted host.

See also

Other web detectors: is_email(), is_ipv4(), is_ipv6(), is_mac()

Examples

is_url(c("https://example.com/p?q=1", "example.com", NA))
#> [1]  TRUE FALSE    NA