setmouth: Specify the Segment and Vertex of the Mouth of a River...

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/segs_direction.R

Description

Provides a user-friendly way of specifying the segment and vertex of the mouth (lowest point) of a river network object.

Usage

1
setmouth(seg, vert, rivers)

Arguments

seg

The segment number to store for the mouth

vert

The vertex number to store for the mouth

rivers

The river network object to use

Value

A new river network object (see rivernetwork)

Note

The mouth segment and vertex can also be specified using direct assignment to the $mouth$seg and $mouth$vert components of the river network object.

This function is called within cleanup, which is recommended in most cases.

Author(s)

Matt Tyers

See Also

line2network

Examples

1
2
3
4
5
6
7
8
data(Gulk)

# say we know that segment 1 is the lowest segment in this river network, but we don't know 
# which end is the mouth.
showends(seg=1, rivers=Gulk)

# this means that the mouth is row 1, so we can specify this:
Gulk <- setmouth(seg=1, vert=1, rivers=Gulk)

riverdist documentation built on Sept. 10, 2021, 9:06 a.m.