tests/testthat/test-shannon.R

test_that(
  "Shannon entropy. Expected = 0.86775",
  {
    expected <- 0.86237
    data(Qesem_s)
    actual <- shannon(Qesem_s$HU)
    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.