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)
})

Try the ggdag package in your browser

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

ggdag documentation built on Sept. 11, 2024, 6:12 p.m.