View source: R/calculate_dci.R
calculate_dci | R Documentation |
river_net
ObjectCalculates the potamodromous and diadromous forms of the Dendritic
Connectivity Index (DCI) for a river_net
object.
calculate_dci(
net,
form,
pass = NULL,
weight = NULL,
threshold = NULL,
parallel = FALSE,
quiet = FALSE
)
net |
A |
form |
A string specifying the DCI form to calculate. Options are: "pot" for potamodromous or "dia" for diadromous. |
pass |
The name of a column in the nodes table of |
weight |
The name of a column in the edges table of |
threshold |
Optional numeric value specifying a dispersal limit in map
units. If |
parallel |
Logical. If |
quiet |
Logical. If |
Passability values are probabilities between 0 and 1, where 0 indicates a fully impassable barrier and 1 indicates full passability. If values in the specified passability column fall outside this range, they will be normalized.
Weighting values should also be probabilities between 0 and 1. River segments
with weights of 0 or NA
will be excluded from the DCI calculation.
Upon successful calculation, the global DCI value for the river network will
be printed to the console unless quiet = TRUE
.
An sf
object of the river network with new columns specifying
segmental DCI values and relative DCI values. These are each segment's
contribution to the global DCI score which is printed. The relative values
are simply those values normalized.
# For the potamodromous DCI
res <- calculate_dci(net = yamaska_net, form = "pot", pass = "pass_1",
weight = "weight")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.