inst/tests/test-entropy.R

#Testing entropy function
expect_that(entropy(c(1,1,2,2)),equals(1))
# NA omited from results
expect_that(entropy(c(1,1,2,2,NA)),equals(1))
expect_that(entropy(c(1,1,1,1)),equals(0))
#
expect_that(entropy(c(1,1,1,1,NA)),equals(0))
clbustos/coolcat-r documentation built on May 13, 2019, 7:39 p.m.