Learn R Programming

riverdist (version 0.17.0)

checkbraidedTF: Check for Braiding in a River Network

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

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.

Author

Matt Tyers

Examples

Run this code
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)

Run the code above in your browser using DataLab