shortest_path: Find shortest path between a pair of nodes in the network.

View source: R/network.R

shortest_pathR Documentation

Find shortest path between a pair of nodes in the network.

Description

Find shortest path between a pair of nodes in the network.

Usage

shortest_path(network, from, to, weights = "weight")

Arguments

network

A spatial network object of class sfnetworks::sfnetwork

from

Start node

to

End node

weights

Name of the column in the network edge table from where to take the weigths

Value

An sf::sfc_LINESTRING object


rcrisp documentation built on Nov. 24, 2025, 5:07 p.m.