View source: R/least_common_parents.R View source: R/extendr-wrappers.R View source: R/extendr-wrappers.R
least_common_parents | R Documentation |
It finds the nodes that have no parents in the given set.
least_common_parents(graph, selected)
graph |
A graph object |
selected |
A character vector of node ids |
A character vector of node ids
Other analyze graphs:
find_all_paths()
,
find_path()
,
find_path_one_to_many()
,
get_all_leaves()
,
get_all_roots()
,
get_leaves_under()
,
get_roots_over()
graph_edges <- data.frame(
parent = c("A", "B", "C", "C", "F"),
child = c("B", "C", "D", "E", "D")
)
graph <- graph_builder() |>
populate_edges(graph_edges, parent, child) |>
build_directed()
graph
graph |> least_common_parents(c("D", "E"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.