tests/testthat/test-hclust1d-true_median.R

test_that("correct true_median linkage results", {
  expect_equal(hclust1d(c(1, 2, 4, 6, 11, -9, -4, -5), method="true_median")$height, c(1.0, 1.0, 2.0, 3.5, 4.5, 8.0, 10.0))
})

Try the hclust1d package in your browser

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

hclust1d documentation built on Aug. 7, 2023, 5:12 p.m.