View source: R/size_intact_to_arc.R
size.intact.to.arc | R Documentation |
The function measures the “size” of the intact network or sub-network (either number of upstream nodes, or user defined defined length, e.g., m, km) with respect to network arcs.
size.intact.to.arc(G, arc.node = "in")
G |
Graph object of class "igraph", see: |
arc.node |
One of |
For an unweighted graph, the upstream network “size” equates to the number of nodes in the intact network or sub-network upstream of an arc. For a graph whose arcs are weighted with actual stream segment lengths (see Examples), this will be the length (in measured units of length given in the weights) of the intact network or sub-network upstream of the arc. The argument arc.node
allows upstream network size to be calculated with respect to either the upstream ("in"
) nodes of arcs or the downstream ("out"
) nodes of arcs. This designation will be applied to define the end (outlet) of the network or sub-network. Thus, option "out"
may produce unexpectedly large results when these downstream "out"
nodes of arcs occur at confluences.
Output is a numeric vector whose length will be equal to the number of arcs in G
.
Ken Aho, Gabor Csardi wrote distances
local.summary
mur <- streamDAGs("mur_full")
data(mur_lengths)
E(mur)$weight <- mur_lengths[,2]
size.intact.to.arc(mur) # upstream network sizes are in meters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.