Skip to contents

This function takes a spatial network represented as an sf object, converts it into a graph format, identifies all connected components, and extracts the largest one.

Usage

calculate_largest_component(network)

Arguments

network

An sf object representing the network to be analyzed.

Value

An sfnetwork object representing the largest connected component of the network.