Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

network_in_network

Network membership of other networks


Description

is_supernet() and is_subnet() check if one network is a true supernet or subnet of another network; overlaps() checks for any overlap between two networks.

Usage

is_supernet(network, other)

is_subnet(network, other)

overlaps(network, other)

Arguments

network

An ip_network vector

other

An ip_network vector

Value

A logical vector

See Also

Use is_within() to check if an ip_address is within an ip_network.

Use supernet() and subnets() to traverse the network hierarchy.

Examples

net1 <- ip_network("192.168.1.128/30")
net2 <- ip_network("192.168.1.0/24")

is_supernet(net1, net2)

is_subnet(net1, net2)

overlaps(net1, net2)

ipaddress

Tidy IP Addresses

v0.5.1
MIT + file LICENSE
Authors
David Hall [aut, cre] (<https://orcid.org/0000-0002-2193-0480>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.