Learn R Programming

iptools (version 0.7.2)

is_multicast: Logical checks for IP addresses

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

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

Run this code
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab