Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(clusternor)
  Loading required package: Rcpp
  > 
  > test_check("clusternor")
  
  
  ***Running test for fcmeans***
  
  Data ==> memory, centroids ==> memory
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  clusternor
   --- call from context --- 
  FuzzyCMeans(test_data, test_centroids, iter.max = iter.max, fuzz.index = 5, 
      nthread = nthread)
   --- call from argument --- 
  if (class(data) == "character") {
      if (class(centers) == "numeric" || class(centers) == "integer") {
          ret <- .Call("R_fcm_data_em", normalizePath(as.character(data)), 
              as.integer(centers), as.double(nrow), as.double(ncol), 
              as.double(iter.max), as.integer(nthread), as.integer(fuzz.index), 
              as.character(init), as.double(tolerance), as.character(dist.type), 
              PACKAGE = "clusternor")
      }
      else if (class(centers) == "matrix") {
          ret <- .Call("R_fcm_data_em_centroids_im", normalizePath(as.character(data)), 
              as.matrix(centers), as.double(nrow), as.double(ncol), 
              as.double(iter.max), as.integer(nthread), as.integer(fuzz.index), 
              as.double(tolerance), as.character(dist.type), PACKAGE = "clusternor")
      }
      else {
          stop(paste("Cannot handle centers of type", class(centers), 
              "\n"))
      }
  } else if (class(data) == "matrix") {
      if (class(centers) == "numeric" || class(centers) == "integer") {
          ret <- .Call("R_fcm_data_im", as.matrix(data), as.integer(centers), 
              as.double(iter.max), as.integer(nthread), as.integer(fuzz.index), 
              as.character(init), as.double(tolerance), as.character(dist.type), 
              PACKAGE = "clusternor")
      }
      else if (class(centers) == "matrix") {
          ret <- .Call("R_fcm_data_centroids_im", as.matrix(data), 
              as.matrix(centers), as.double(iter.max), as.integer(nthread), 
              as.integer(fuzz.index), as.double(tolerance), as.character(dist.type), 
              PACKAGE = "clusternor")
      }
      else {
          stop(paste("Cannot handle centers of type", class(centers), 
              "\n"))
      }
  } else {
      stop(paste("Cannot handle data of type", class(data), "\n"))
  }
   --- R stacktrace ---
  where 1 at testthat/test-fuzzy-cmeans.R#54: FuzzyCMeans(test_data, test_centroids, iter.max = iter.max, fuzz.index = 5, 
      nthread = nthread)
  where 2 at testthat/test-fuzzy-cmeans.R#62: test.data.centroids.in.mem()
  where 3: eval(code, test_env)
  where 4: eval(code, test_env)
  where 5: 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 6: doTryCatch(return(expr), name, parentenv, handler)
  where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 11: tryCatchList(expr, classes, parentenv, handlers)
  where 12: 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 13: test_code(NULL, exprs, env)
  where 14: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 15: force(code)
  where 16: doWithOneRestart(return(expr), restart)
  where 17: withOneRestart(expr, restarts[[1L]])
  where 18: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 19: 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 20: FUN(X[[i]], ...)
  where 21: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 22: force(code)
  where 23: doWithOneRestart(return(expr), restart)
  where 24: withOneRestart(expr, restarts[[1L]])
  where 25: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 26: 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 27: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 28: 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 29: 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 30: test_check("clusternor")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (data, centers, nrow = -1, ncol = -1, iter.max = .Machine$integer.max, 
      nthread = -1, fuzz.index = 2, init = c("forgy", "none"), 
      tolerance = 1e-06, dist.type = c("sqeucl", "eucl", "cos", 
          "taxi")) 
  {
      if (class(data) == "character") {
          if (class(centers) == "numeric" || class(centers) == 
              "integer") {
              ret <- .Call("R_fcm_data_em", normalizePath(as.character(data)), 
                  as.integer(centers), as.double(nrow), as.double(ncol), 
                  as.double(iter.max), as.integer(nthread), as.integer(fuzz.index), 
                  as.character(init), as.double(tolerance), as.character(dist.type), 
                  PACKAGE = "clusternor")
          }
          else if (class(centers) == "matrix") {
              ret <- .Call("R_fcm_data_em_centroids_im", normalizePath(as.character(data)), 
                  as.matrix(centers), as.double(nrow), as.double(ncol), 
                  as.double(iter.max), as.integer(nthread), as.integer(fuzz.index), 
                  as.double(tolerance), as.character(dist.type), 
                  PACKAGE = "clusternor")
          }
          else {
              stop(paste("Cannot handle centers of type", class(centers), 
                  "\n"))
          }
      }
      else if (class(data) == "matrix") {
          if (class(centers) == "numeric" || class(centers) == 
              "integer") {
              ret <- .Call("R_fcm_data_im", as.matrix(data), as.integer(centers), 
                  as.double(iter.max), as.integer(nthread), as.integer(fuzz.index), 
                  as.character(init), as.double(tolerance), as.character(dist.type), 
                  PACKAGE = "clusternor")
          }
          else if (class(centers) == "matrix") {
              ret <- .Call("R_fcm_data_centroids_im", as.matrix(data), 
                  as.matrix(centers), as.double(iter.max), as.integer(nthread), 
                  as.integer(fuzz.index), as.double(tolerance), 
                  as.character(dist.type), PACKAGE = "clusternor")
          }
          else {
              stop(paste("Cannot handle centers of type", class(centers), 
                  "\n"))
          }
      }
      else {
          stop(paste("Cannot handle data of type", class(data), 
              "\n"))
      }
  }
  <bytecode: 0x55d12a61d560>
  <environment: namespace:clusternor>
   --- function search by body ---
  Function FuzzyCMeans in namespace clusternor has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1