powered by
The input graph can be either directed or undirected. If directed, then it is made undirected before directionality is assigned.
set_graph_directionality(graph, field_name = "name", outlet_name)
an object of class 'igraph' containing a directed graph.
an 'igraph' object representing a river structure where reaches are nodes and confluences (or fragmentation items) are links.
a character value that flags the vertices attribute used to designate the outlet. Each vertex must have an unique value for this field.
a character value corresponding to the 'field_name' attribute
library(igraph) g <- igraph::graph_from_literal(1-2, 2-4, 3-2, 4-6, 6-7, 5-6, 7-8, 9-5, 10-5 ) g1 <- set_graph_directionality(g, field_name = "name", "8")
Run the code above in your browser using DataLab