context("Testing E-I index")
test_that("E-I index returns correct value for Catania data", {
p <- Catania / sum(Catania)
int <- sum(diag(p))
ext <- 1 - int
tv <- ext - int
v <- ei(Catania)
expect_equal(v, tv)
} )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.