tests/testthat/test-as_tbl_graph.R

test_that("daggity and tidy dags become tidy tbls", {
  library(tidygraph)
  dagitty_tbl_graph <- as_tbl_graph(butterfly_bias())
  tidy_dagitty_tbl_graph <- as_tbl_graph(butterfly_bias() %>% tidy_dagitty())
  expect_s3_class(dagitty_tbl_graph, "tbl_graph")
  expect_s3_class(tidy_dagitty_tbl_graph, "tbl_graph")
})

Try the ggdag package in your browser

Any scripts or data that you put into this service are public.

ggdag documentation built on May 31, 2023, 7:48 p.m.