tests/testthat/test-utils.R

phy = ape::rtree(n = 300)

test_that("vcv should have the same results with ape::vcv", {
    expect_equal(ape::vcv(phy, corr = FALSE), vcv2(phy, corr = FALSE))
    expect_equal(ape::vcv(phy, corr = TRUE), vcv2(phy, corr = TRUE))
})

# microbenchmark::microbenchmark(ape::vcv(phy, corr = FALSE), vcv2(phy, corr = FALSE),
# times = 10) microbenchmark::microbenchmark(ape::vcv(phy, corr = TRUE), vcv2(phy,
# corr = TRUE), times = 10)

Try the phyr package in your browser

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

phyr documentation built on Jan. 13, 2021, 5:40 p.m.