tests/testthat/test-inter_functions.R

data("mouseData")


test_that("compute distance matrix", {
  aggdat <- aggFeatures(mouseData, level = "order")
  distmat <- computeDistMat(aggdat, dist_method = "bray")
  expect_equal(round(sum(distmat)), 1740)
  distmat <- computeDistMat(aggdat, dist_method = "euclidean")
  expect_equal(round(sum(distmat)), 89262)
})
zoecastillo/microbiomeExplorer documentation built on Sept. 11, 2022, 7:40 a.m.