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")
Arguments
G: Graph object of class "igraph", see: graph_from_literal.
arc.node: One of "in" or "out", indicating whether the upstream network or sub-network will be defined with respect to input nodes of directional arcs (arc.node = "in") or output (end) nodes of arcs (arc.node = "out"). The former (default) option is reccomended (see Details).
Details
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.
Returns
Output is a numeric vector whose length will be equal to the number of arcs in G.
Author(s)
Ken Aho, Gabor Csardi wrote distances
See Also
local.summary
Examples
mur <- streamDAGs("mur_full")data(mur_lengths)E(mur)$weight <- mur_lengths[,2]size.intact.to.arc(mur)# upstream network sizes are in meters