checkbraidedTF: Check for Braiding in a River Network

Description Usage Arguments Note Author(s) Examples

View source: R/detectbraiding.R

Description

Detects braiding (multiple flow channels between two locations) within a river network object, and returns a logical value for specifying braiding within a river network object.

Usage

1
checkbraidedTF(rivers, toreturn = "rivers", progress = TRUE)

Arguments

rivers

The river network object to check.

toreturn

Specifying toreturn="rivers" (the default) will return a river network object with a value of TRUE or FALSE assigned to the $braided element of the river network object. Specifying toreturn="logical" will just return TRUE if braiding is detected or FALSE if no braiding is detected. Specifying toreturn="routes" will return the first two differing routes detected, which may be useful in identifying where the problem lies.

progress

Whether to show the progress bar. Defaults to TRUE.

Note

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

Author(s)

Matt Tyers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(Gulk,KilleyW)
Gulk <- setmouth(seg=1, vert=1, rivers=Gulk)
plot(x=Gulk)
checkbraidedTF(rivers=Gulk, toreturn="logical")

KilleyW <- setmouth(seg=1, vert=288, rivers=KilleyW)
plot(x=KilleyW)
checkbraidedTF(rivers=KilleyW, toreturn="logical")
checkbraidedTF(rivers=KilleyW, toreturn="routes")

KilleyW.1 <- checkbraidedTF(rivers=KilleyW, toreturn="rivers")
str(KilleyW.1)

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