tests/testthat/test-qts-hclust.R

test_that("Function hclust.default() works", {
  hc <- hclust(dist(USArrests), linkage_criterion = "average")
  expect_equal(length(hc), 7)
})

test_that("Function hclust.qts_sample() works", {
  out <- hclust(vespa64$igp[1:10], n_clusters = 2)
  expect_equal(out$best_clustering$n_clusters, 2)
})

Try the squat package in your browser

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

squat documentation built on June 8, 2025, 11:30 a.m.