tests/testthat/test_ceg.R

context("ceg")

model <- full(PhDArticles, lambda = 1)
model2 <- stages_fbhc(model)

test_that("ceg function works", {
  expect_is(ceg(model), class = "ceg")
  expect_is(ceg(model2), class = "ceg")
})

test_that("ceg2adjmat", {
  expect_is(ceg2adjmat(ceg(model)), "matrix")
  expect_is(ceg2adjmat(ceg(model2)), "matrix")
})

Try the stagedtrees package in your browser

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

stagedtrees documentation built on April 29, 2022, 1:06 a.m.