Running ‘testthat.R’ [13s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ClusterR)
  Loading required package: gtools
  > 
  > test_check("ClusterR")
  
   *** caught segfault ***
  address 2, cause 'memory not mapped'
  
  Traceback:
   1: .Call(`_ClusterR_ClusterMedoids`, data, clusters, method, minkowski_p,     threads, verbose, swap_phase, fuzzy, seed)
   2: ClusterMedoids(data, clusters, distance_metric, minkowski_p,     threads, verbose, swap_phase, fuzzy, seed)
   3: Cluster_Medoids(dat, clusters = 1, distance_metric = "euclidean",     swap_phase = TRUE, fuzzy = T)
   4: eval(code, test_env)
   5: eval(code, test_env)
   6: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
  14: test_code(desc, code, env = parent.frame())
  15: testthat::test_that("in case that clusters = 1, it returns the correct output",     {        cm = Cluster_Medoids(dat, clusters = 1, distance_metric = "euclidean",             swap_phase = TRUE, fuzzy = T)        testthat::expect_true(sum(names(cm) %in% c("medoids",             "medoid_indices", "best_dissimilarity", "dissimilarity_matrix",             "clusters", "silhouette_matrix", "fuzzy_probs", "clustering_stats")) ==             8 && class(cm) == "cluster medoids silhouette" &&             is.vector(cm$medoids) && is.vector(cm$medoid_indices) &&             is.numeric(cm$best_dissimilarity) && is.vector(cm$clusters) &&             is.null(cm$silhouette_matrix) && is.matrix(cm$fuzzy_probs) &&             is.null(cm$clustering_stats))    })
  16: eval(exprs, env)
  17: eval(exprs, env)
  18: source_file(path, new.env(parent = env), chdir = TRUE)
  19: force(code)
  20: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  21: FUN(X[[i]], ...)
  22: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  23: force(code)
  24: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  25: test_files(paths, reporter = reporter, env = env, ...)
  26: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  27: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  28: run_tests(package, test_path, filter, reporter, ...)
  29: test_check("ClusterR")
  An irrecoverable exception occurred. R is aborting now ...