Learn R Programming

rcrisp (version 0.3.1)

filter_network: 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")

Value

A spatial network object of class sfnetworks::sfnetwork

Arguments

network

A spatial network object of class sfnetworks::sfnetwork

target

The target geometry

elements

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