is_checks: Logical checks for IP addresses

Description Usage Arguments Value See Also Examples

Description

Check whether an IP address is valid with is_valid, IPv4 with is_ipv4, IPv6 with is_ipv6, or multicast (intended to point to multiple machines) with is_multicast

Usage

1
2
3
4
5
6
7
is_multicast(ip_addresses)

is_ipv4(ip_addresses)

is_ipv6(ip_addresses)

is_valid(ip_addresses)

Arguments

ip_addresses

a vector of IP addresses

Value

a vector of TRUE or FALSE values, indicating whether an IP is multicast or not, or NA values if the IP addresses are NAs.

See Also

ip_classify for character rather than logical classification.

Examples

1
2
3
4
5
6
7
8
# This is multicast
is_multicast("224.0.0.2")

# It's also IPv4
is_ipv4("224.0.0.2")

# It's not IPv6
is_ipv6("224.0.0.2")

iptools documentation built on May 2, 2019, 2:53 p.m.