test_that("use", {
expect_equal(species_type_to_str("A"), "anagenetic")
expect_equal(species_type_to_str("C"), "cladogenetic")
expect_equal(species_type_to_str("I"), "immigrant")
expect_error(species_type_to_str(-1))
expect_error(species_type_to_str(7))
expect_error(species_type_to_str(NA))
expect_error(species_type_to_str(NULL))
expect_error(species_type_to_str(Inf))
expect_error(species_type_to_str(c(1, 2)))
expect_error(species_type_to_str(c()))
expect_error(species_type_to_str(list()))
expect_error(species_type_to_str("nonsense"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.