Learn R Programming

ipaddress (version 1.0.2)

collapse_networks: Collapse contiguous and overlapping networks

Description

Given a vector of networks, this returns the minimal set of networks required to represent the same range of addresses.

Usage

collapse_networks(network)

Value

An ip_network vector (potentially shorter than the input)

Arguments

network

An ip_network vector

See Also

exclude_networks()

Examples

Run this code
collapse_networks(ip_network(c("192.168.0.0/24", "192.168.1.0/24")))

Run the code above in your browser using DataLab