tests/testthat/test-posterior_dens.R

test_that(paste("posterior_dens creates correct lists with graphs"), {

  bma_results <- bma(badp::small_model_space, round= 3, dilution = 0)

  distPlots <- posterior_dens(bma_results, prior = "binomial", SE = "standard")

  expect_equal(class(distPlots), "list")
  expect_true(ggplot2::is_ggplot(distPlots[[1]]))
  expect_true(ggplot2::is_ggplot(distPlots[[2]]))
  expect_true(ggplot2::is_ggplot(distPlots[[3]]))
})

Try the badp package in your browser

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

badp documentation built on Aug. 20, 2026, 9:08 a.m.