Nothing
test_that("can find least common parents between selected nodes", {
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 |>
least_common_parents(c("D", "E")) |>
as.character() |>
sort() |>
expect_equal(c("D", "E"))
graph |>
least_common_parents(c("C", "D", "E")) |>
as.character() |>
expect_equal("C")
graph |>
least_common_parents(c("A", "B", "C", "D", "E", "F")) |>
as.character() |>
sort() |>
expect_equal(c("A", "F"))
})
test_that("can find least common parents between selected nodes on acyclic", {
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_acyclic()
graph |>
least_common_parents(c("D", "E")) |>
as.character() |>
sort() |>
expect_equal(c("D", "E"))
graph |>
least_common_parents(c("C", "D", "E")) |>
as.character() |>
expect_equal("C")
graph |>
least_common_parents(c("A", "B", "C", "D", "E", "F")) |>
as.character() |>
sort() |>
expect_equal(c("A", "F"))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.