Nothing
context("double cherries")
test_that("usage", {
set.seed(42)
focal_tree <- ape::rphylo(n = 4, birth = 1, death = 0)
bal_tree <- treestats::create_fully_balanced_tree(focal_tree)
c1 <- treestats::double_cherries(bal_tree)
testthat::expect_equal(c1, 1)
ltab <- treestats::phylo_to_l(bal_tree)
c2 <- treestats::double_cherries(ltab)
testthat::expect_equal(c2, 1)
focal_tree <- ape::rphylo(n = 8, birth = 1, death = 0)
bal_tree <- treestats::create_fully_balanced_tree(focal_tree)
c1 <- treestats::double_cherries(bal_tree)
testthat::expect_equal(c1, 2)
ltab <- treestats::phylo_to_l(bal_tree)
c2 <- treestats::double_cherries(ltab)
testthat::expect_equal(c2, 2)
})
test_that("wrong_object", {
testthat::expect_error(
treestats::double_cherries(10),
"input object has to be phylo or ltable"
)
testthat::expect_error(
treestats::double_cherries(list()),
"input object has to be phylo or ltable"
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.