tests/testthat/test_mFromMarginal.R

# Tests "mFromMarginal" function
context("construct masses of a bca from marginal probabiltiies")
library(dst)
test_that("mFromMarginal", {
  p <- c(2,2,1.5,1.2,1,0,0)
  m1 <- mFromMarginal(p, simple = TRUE)
  expect_equal(length(m1), 2)
  m2 <- mFromMarginal(p, simple = FALSE)
  expect_equal(length(m2), 5)
})
RAPLER/dst-1 documentation built on June 2, 2025, 9:22 a.m.