tests/testthat/test-expectedVariables.R

context("expectedVariables")

test_that("expectedVariables",
{
  Net <- HydeNetwork(~ wells +
                       pe | wells +
                       d.dimer | pregnant*pe +
                       angio | pe +
                       treat | d.dimer*angio +
                       death | pe*treat,
                     data = PE) %>%
    setDecisionNodes(treat, angio)
  expect_equal(expectedVariables(Net, treat, TRUE),
               c("d.dimer", "angio"))
})

Try the HydeNet package in your browser

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

HydeNet documentation built on July 8, 2020, 5:15 p.m.