sbn_change_dir.Rd
Change the upstream/downstream direction of an SBN to either, reversed or undirected.
sbn_change_dir(g, method = c("rev", "undir"))
a river network as an igraph object. Must be a downstream directed graph.
one of "rev" or "undir", determining what to convert the network to.
A river network as an igraph object.
g <- sbn_create(10, 0.7)
sbn_change_dir(g, method = "rev")
#> IGRAPH 637f488 DN-- 10 9 --
#> + attr: name (v/c)
#> + edges from 637f488 (vertex names):
#> [1] 1->2 2->3 3->4 3->5 4->6 4->7 5->8 6->9 6->10