tests/testthat/test_belplauH.R

# Tests "belplauH" function
context("Calculate belief, disbelief, unkown, plausibility, plausibility ratio")
library(dst)
test_that("belplauH",{
  ## T1 test hypotheses 
  x1 <- bca(matrix(c(1,1,0,1,1,1), nrow = 2, byrow = TRUE), c(0.8, 0.2), c(1,2,3))
  y <- belplauH(x1$spec[,2],x1$tt,matrix(c(1,1,0,1,1,1), nrow=2, byrow = TRUE))
  expect_equal(unname(x1$spec[1,1]), unname(y[2,1]))
})

Try the dst package in your browser

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

dst documentation built on Sept. 11, 2024, 7:05 p.m.