test_that("use", {
expect_equal(stac_to_english_str(0), "[no colonization has taken place]")
expect_equal(stac_to_english_str(1), "Non-endemic at maximum age")
expect_equal(stac_to_english_str(2), "Endemic")
expect_equal(stac_to_english_str(3), "Endemic and non-endemic")
expect_equal(stac_to_english_str(4), "Non-endemic")
expect_equal(stac_to_english_str(5), "Endemic singleton at maximum age")
expect_equal(stac_to_english_str(6), "Endemic clade at maximum age")
expect_error(stac_to_english_str(-1))
expect_error(stac_to_english_str(7))
expect_error(stac_to_english_str(NA))
expect_error(stac_to_english_str(NULL))
expect_error(stac_to_english_str(Inf))
expect_error(stac_to_english_str(c(1, 2)))
expect_error(stac_to_english_str(c()))
expect_error(stac_to_english_str(list()))
expect_error(stac_to_english_str("nonsense"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.