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

Try the balance package in your browser

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

balance documentation built on July 10, 2019, 9:03 a.m.