tests/testthat/test-ahc_inertia.R

library(helda)

context('AHC inter group inertia Function')

test_that("ahc function", {
  data <- mtcars
  results <- compute_inertia_ahc(data = data, max_clusters = 15)
  load('ahc_test.Rda')
  expect_equal(results, ahc_test, check.environment = FALSE)
})

Try the helda package in your browser

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

helda documentation built on Jan. 6, 2021, 5:09 p.m.