tests/testthat/test-sbp.R

# library(balance)
#
# h <- hclust(dist(cars[1:35,]))
# phylo <- ape::as.phylo(h)
# sbp1 <- philr::phylo2sbp(phylo)
# sbp2 <- sbp.fromHclust(h)
# colnames(sbp2) <- NULL
#
# test_that("sbp.fromHclust matches the ape and philr method", {
#
#   expect_equal(
#     sbp1[,1],
#     sbp2[,1]
#   )
#
#   expect_equal(
#     sbp.sort(sbp1),
#     sbp.sort(sbp2)
#   )
# })
tpq/balance documentation built on Aug. 6, 2021, 10:45 p.m.