tests/testthat/test_dclust.R

test_that("Testing RcppML::nmf", {
  options(RcppML.threads = 1)
  
  A <- rsparsematrix(100, 1000, 0.1)
  m <- dclust(A, min_samples = 100, min_dist = 0)
  
  expect_equal(sum(unlist(lapply(m, function(x) length(x$samples)))) == 1000, TRUE)

})
zdebruine/RcppML documentation built on Sept. 13, 2023, 11:44 p.m.