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)))
})

Try the nLTT package in your browser

Any scripts or data that you put into this service are public.

nLTT documentation built on Aug. 21, 2023, 5:13 p.m.