tests/testthat/test-dec_shannon.R

test_that(
  "Decomposition of Shannon Entropy. Returns 0.17038",
  {
    expected <- 0.16768
    data(Qesem_s)
    actual <- dec_shannon(Qesem_s$HU, Qesem_s$Group)$within
    expect_equal(round(actual,5), round(expected,5))
  }
)

Try the diversityArch package in your browser

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

diversityArch documentation built on June 13, 2026, 5:07 p.m.