Running 'testthat.R' [7s/8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(ClusterR)
  Loading required package: gtools
  > 
  > test_check("ClusterR")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ClusterR
   --- call from context --- 
  distance_matrix(sm_data, upper = T, diagonal = T)
   --- call from argument --- 
  if (class(data) != "matrix") stop("data should be either a matrix or a data frame")
   --- R stacktrace ---
  where 1 at testthat/test-AP.R#8: distance_matrix(sm_data, upper = T, diagonal = T)
  where 2: eval(code, test_env)
  where 3: eval(code, test_env)
  where 4: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 5: doTryCatch(return(expr), name, parentenv, handler)
  where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 10: tryCatchList(expr, classes, parentenv, handlers)
  where 11: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 12: test_code(NULL, exprs, env)
  where 13: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 14: force(code)
  where 15: doWithOneRestart(return(expr), restart)
  where 16: withOneRestart(expr, restarts[[1L]])
  where 17: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 18: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 19: FUN(X[[i]], ...)
  where 20: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 21: force(code)
  where 22: doWithOneRestart(return(expr), restart)
  where 23: withOneRestart(expr, restarts[[1L]])
  where 24: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 25: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 26: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 27: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 28: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 29: test_check("ClusterR")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (data, method = "euclidean", upper = FALSE, diagonal = FALSE, 
      minkowski_p = 1, threads = 1) 
  {
      if ("data.frame" %in% class(data)) 
          data = as.matrix(data)
      if (class(data) != "matrix") 
          stop("data should be either a matrix or a data frame")
      if (!method %in% c("euclidean", "manhattan", "chebyshev", 
          "canberra", "braycurtis", "pearson_correlation", "simple_matching_coefficient", 
          "minkowski", "hamming", "jaccard_coefficient", "Rao_coefficient", 
          "mahalanobis", "cosine")) 
          stop("the method should be one of 'euclidean', 'manhattan', 'chebyshev', 'canberra', 'braycurtis', 'pearson_correlation', 'simple_matching_coefficient',\n         'minkowski', 'hamming', 'jaccard_coefficient', 'Rao_coefficient', 'mahalanobis', 'cosine'")
      if (!is.logical(upper)) 
          stop("the upper parameter should be either TRUE or FALSE")
      if (!is.logical(diagonal)) 
          stop("the diagonal parameter should be either TRUE or FALSE")
      if (method == "minkowski" && minkowski_p == 0) 
          stop("if distance metric is minkowski then the minkowski_p should be either a positive or a negative number but not 0.0")
      if (threads < 1) 
          stop("the number of threads should be greater than 1")
      res = dissim_mat(data, method, minkowski_p, upper, diagonal, 
          threads, 1e-06)
      return(res)
  }
  <bytecode: 0xad16f30>
  <environment: namespace:ClusterR>
   --- function search by body ---
  Function distance_matrix in namespace ClusterR has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1