tests/testthat/test-canonical.R

set.seed(1234)

test_that("dags cannonicalize correctly", {
  test_dag <- dagify(y ~ x + z, x ~ ~z)
  p <- ggdag_canonical(test_dag)
  expect_doppelganger("ggdag_canonical() expands ~~", p)
})
malcolmbarrett/ggdag documentation built on March 8, 2024, 5:49 p.m.