Function returns the river network consisting of all upstream segments from the specified river segment.

upstream(HSnetwork, ID, riverID = "riverID")

Arguments

HSnetwork

a HSnetwork (routed river network) object obtained with river_network.

ID

The ID of the segment for which the upstream river network is returned.

riverID

A character string which specifies the name of the column in river containing unique river network identifiers. Defaults to "riverID".

Value

The input HSnetwork object consisting of only upstream segments.