https://github.com/cran/bayestestR
Raw File
Tip revision: 79b3ea026adbb877bc1921a9cf1ea0eae067cb63 authored by Dominique Makowski on 12 February 2024, 11:40:02 UTC
version 0.13.2
Tip revision: 79b3ea0
test-overlap.R
test_that("overlap", {
  set.seed(333)
  x <- distribution_normal(1000, 2, 0.5)
  y <- distribution_normal(1000, 0, 1)

  expect_equal(as.numeric(overlap(x, y)), 0.185, tolerance = 0.01)
  out <- capture.output(print(overlap(x, y)))
  expect_identical(out, c("# Overlap", "", "18.6%"))
})
back to top