View source: R/navigate_network_dfs.R
navigate_network_dfs | R Documentation |
given a starting node, return all reachable paths. Once visited, a node is marked as visited and will not take part in a future path.
navigate_network_dfs(x, starts, direction = "down", reset = FALSE)
x |
data.frame containing hydroloom compatible network or list as returned by make_index_ids (for down) or make_fromids (for up). The list formats avoids recreating the index ids for every call to navigate network dfs in the case that it needs to be called many times. |
starts |
vector with ids from x to start at. |
direction |
character "up or "down" |
reset |
logical if TRUE, reset graph for each start such that later paths will have overlapping results. |
list containing dfs result for each start.
x <- hy(sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom")))
x <- add_toids(x, return_dendritic = FALSE)
navigate_network_dfs(x, 8893402)
navigate_network_dfs(x, 8897784, direction = "up")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.