Running ‘testthat.R’ [93s/127s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(smartdata)
  Loading required package: mice
  Loading required package: lattice
  
  Attaching package: 'mice'
  
  The following objects are masked from 'package:base':
  
      cbind, rbind
  
  > 
  > test_check("smartdata")
    missForest iteration 1 in progress...done!
    missForest iteration 2 in progress...done!
    missForest iteration 3 in progress...done!
    missForest iteration 4 in progress...done!
  [1] "ANS is done"
  [1] "0 samples filtered by NEATER"
  [1] "SLS done"
  finding neighbours
  calculating weights
  computing coordinates
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  smartdata
   --- call from context --- 
  checks[[argName]]$check(arg)
   --- call from argument --- 
  if (class(x) != "matrix") stop("similarity parameter needs a matrix of similarities of the dataset variabless")
   --- R stacktrace ---
  where 1: checks[[argName]]$check(arg)
  where 2: FUN(X[[i]], ...)
  where 3: lapply(X = X, FUN = FUN, ...)
  where 4: sapply(names(checks), function(argName) {
      arg <- args[[argName]]
      if (is.null(arg) && !is.null(checks[[argName]]$default)) {
          arg <- checks[[argName]]$default
      }
      else {
          checks[[argName]]$check(arg)
      }
      arg
  }, simplify = FALSE)
  where 5: mapArguments(task$args, callArgs)
  where 6: doSpaceTransformation.adaptiveGPCA(task)
  where 7: doSpaceTransformation(task)
  where 8: preprocess.spaceTransformation(task)
  where 9: preprocess(task)
  where 10: space_transformation(antibiotics, "adaptative_gpca", similarity = AntibioticSmall$Q, 
      num_features = 2)
  where 11: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 12: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      cnd <- cnd_entrace(cnd)
      return_from(env, cnd)
  })
  where 13: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 14: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 15 at testthat/testSpaceTransformation.R#11: expect_error(space_transformation(antibiotics, "adaptative_gpca", 
      similarity = AntibioticSmall$Q, num_features = 2), NA)
  where 16: eval(code, test_env)
  where 17: eval(code, test_env)
  where 18: 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 19: doTryCatch(return(expr), name, parentenv, handler)
  where 20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 24: tryCatchList(expr, classes, parentenv, handlers)
  where 25: 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 26: test_code(desc, code, env = parent.frame())
  where 27 at testthat/testSpaceTransformation.R#8: test_that("Correct space transformation", {
      expect_error(space_transformation(ecoli1, "lle_knn", regularization = 3, 
          k = 3, num_features = 2, exclude = c("Mcg", "Alm1")), 
          NA)
      expect_error(space_transformation(antibiotics, "adaptative_gpca", 
          similarity = AntibioticSmall$Q, num_features = 2), NA)
  })
  where 28: eval(code, test_env)
  where 29: eval(code, test_env)
  where 30: 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 31: doTryCatch(return(expr), name, parentenv, handler)
  where 32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 33: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 34: doTryCatch(return(expr), name, parentenv, handler)
  where 35: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 36: tryCatchList(expr, classes, parentenv, handlers)
  where 37: 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 38: test_code(NULL, exprs, env)
  where 39: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 40: force(code)
  where 41: doWithOneRestart(return(expr), restart)
  where 42: withOneRestart(expr, restarts[[1L]])
  where 43: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 44: 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 45: FUN(X[[i]], ...)
  where 46: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 47: force(code)
  where 48: doWithOneRestart(return(expr), restart)
  where 49: withOneRestart(expr, restarts[[1L]])
  where 50: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 51: 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 52: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 53: 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 54: 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 55: test_check("smartdata")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") 
          stop("similarity parameter needs a matrix of similarities of the dataset variabless")
  }
  <bytecode: 0x55b97f32a320>
  <environment: namespace:smartdata>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1