tests/testthat/test-get_n_lineages.R

context("get_n_lineages")

test_that("get_n_lineages example", {
  phylogeny <- ape::read.tree(text = "((a:2,b:2):1,c:3);")
  testthat::expect_true(
    all.equal(nLTT::get_n_lineages(phylogeny), c(2, 3)))
  phylogeny$root.edge <- 2 # nolint ape variable name
  testthat::expect_true(
    all.equal(nLTT::get_n_lineages(phylogeny), c(1, 2, 3)))
})
richelbilderbeek/nLTT documentation built on Aug. 23, 2023, 8 a.m.