filter_network: Subset a network keeping the components that intersect a...

View source: R/network.R

filter_networkR Documentation

Subset a network keeping the components that intersect a target geometry.

Description

If subsetting results in multiple disconnected components, we keep the main one.

Usage

filter_network(network, target, elements = "nodes")

Arguments

network

A network object

target

The target geometry

elements

The elements of the network to filter. It can be "nodes" or "edges"

Value

A spatial network object


rcrisp documentation built on Aug. 8, 2025, 6:42 p.m.