tests/testthat/test-calc_normalized_entropy.R

# Test: calc_normalized_entropy

test_that("complete variation", {
  x <- c("A", "B", "C", "D", "E")
  expect_equal(calc_normalized_entropy(x), 1)
})

test_that("variation", {
  x <- c("A", "A", "A", "A", "E")
  expect_lt(calc_normalized_entropy(x), 1)
})

Try the qtkit package in your browser

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

qtkit documentation built on April 4, 2025, 4:47 a.m.