Running 'testthat.R' [12s/14s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(umap)
  > 
  > test_check("umap")
  
  test_checks
  
  test_print
  
  test_coo
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#18: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#17: test_that("coo construction from matrix without names", {
      result = coo(conmat)
      expect_equal(result$n.elements, 3)
      expect_null(result$names)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 1. Error: coo construction from matrix without names (@test_coo.R#18)  ------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mm)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#27: coo(mm)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#24: test_that("coo construction from matrix with names", {
      mm = conmat
      colnames(mm) = rownames(mm) = letters[1:3]
      result = coo(mm)
      expect_equal(result$n.elements, 3)
      expect_equal(result$names, letters[1:3])
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 2. Error: coo construction from matrix with names (@test_coo.R#27)  ---------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(mm)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#34: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#33: test_that("coo in simple matrix", {
      result = coo(conmat)
      expect_equal(class(result), "coo")
      expect_equal(result$n.elements, 3)
      expected = matrix(0, ncol = 3, nrow = 9)
      expected[1, ] = c(1, 1, 0)
      expected[2, ] = c(1, 2, 4)
      expected[3, ] = c(1, 3, 7)
      expected[4, ] = c(2, 1, 2)
      expected[5, ] = c(2, 2, 0)
      expected[6, ] = c(2, 3, 8)
      expected[7, ] = c(3, 1, 3)
      expected[8, ] = c(3, 2, 6)
      expected[9, ] = c(3, 3, 0)
      colnames(expected) = c("from", "to", "value")
      expect_equal(expected, result$coo)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 3. Error: coo in simple matrix (@test_coo.R#34)  ----------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(matrix(0, ncol = 2, nrow = 4))
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(matrix(0, ncol = 2, nrow = 4))
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 6 at testthat/test_coo.R#60: expect_error(coo(matrix(0, ncol = 2, nrow = 4)))
  where 7: eval(code, test_env)
  where 8: eval(code, test_env)
  where 9: 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 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 15: tryCatchList(expr, classes, parentenv, handlers)
  where 16: 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 17: test_code(desc, code, env = parent.frame())
  where 18 at testthat/test_coo.R#56: test_that("coo signals input must be matrix", {
      expect_error(coo(1:5))
      expect_error(coo(matrix(0, ncol = 2, nrow = 4)))
  })
  where 19: eval(code, test_env)
  where 20: eval(code, test_env)
  where 21: 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 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 27: tryCatchList(expr, classes, parentenv, handlers)
  where 28: 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 29: test_code(NULL, exprs, env)
  where 30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 31: force(code)
  where 32: doWithOneRestart(return(expr), restart)
  where 33: withOneRestart(expr, restarts[[1L]])
  where 34: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 35: 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 36: FUN(X[[i]], ...)
  where 37: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 38: force(code)
  where 39: doWithOneRestart(return(expr), restart)
  where 40: withOneRestart(expr, restarts[[1L]])
  where 41: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 42: 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 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 44: 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 45: 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 46: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(conmat)
  where 2: check.coo(x, "reduce")
  where 3 at testthat/test_coo.R#76: reduce.coo(coo(conmat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_coo.R#75: test_that("simplify coo with zeros, default settings", {
      result = reduce.coo(coo(conmat))
      expected = matrix(0, ncol = 3, nrow = 6)
      expected[1, ] = c(1, 2, 4)
      expected[2, ] = c(1, 3, 7)
      expected[3, ] = c(2, 1, 2)
      expected[4, ] = c(2, 3, 8)
      expected[5, ] = c(3, 1, 3)
      expected[6, ] = c(3, 2, 6)
      colnames(expected) = c("from", "to", "value")
      expect_equal(expected, result$coo)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 4. Error: simplify coo with zeros, default settings (@test_coo.R#76)  -------
  the condition has length > 1
  Backtrace:
   1. umap:::reduce.coo(coo(conmat))
   3. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "reduce")
  where 3 at testthat/test_coo.R#92: reduce.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_coo.R#89: test_that("simplify coo, to just one row", {
      mat = matrix(0, ncol = 5, nrow = 5)
      mat[2, 3] = 8
      result = reduce.coo(coo(mat))
      expected = matrix(0, ncol = 3, nrow = 1)
      expected[1, ] = c(2, 3, 8)
      colnames(expected) = c("from", "to", "value")
      expect_equal(expected, result$coo)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 5. Error: simplify coo, to just one row (@test_coo.R#92)  -------------------
  the condition has length > 1
  Backtrace:
   1. umap:::reduce.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(conmat)
  where 2: check.coo(x, "transpose")
  where 3 at testthat/test_coo.R#106: t.coo(coo(conmat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_coo.R#105: test_that("coo of transpose is the same as transpose of coo", 
      {
          result = t.coo(coo(conmat))
          result$coo = result$coo[order(result$coo[, "from"], result$coo[, 
              "to"]), ]
          expected = coo(t(conmat))
          expect_equal(expected, result)
      })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 6. Error: coo of transpose is the same as transpose of coo (@test_coo.R#106) 
  the condition has length > 1
  Backtrace:
   1. umap:::t.coo(coo(conmat))
   3. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(m1)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#124: coo(m1)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#120: test_that("multiplication between incompatible objects", {
      m1 = conmat
      rownames(m1) = colnames(m1) = letters[1:3]
      c1 = coo(m1)
      m2 = m1[1:2, 1:2]
      c2 = coo(m2)
      m3 = m1
      colnames(m3) = rownames(m3) = NULL
      c3 = coo(m3)
      expect_error(multiply.coo(c1, c2))
      expect_error(multiply.coo(c1, c3))
      expect_error(multiply.coo(c2, c3))
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 7. Error: multiplication between incompatible objects (@test_coo.R#124)  ----
  the condition has length > 1
  Backtrace:
   1. umap:::coo(m1)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mm)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#143: coo(mm)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#140: test_that("multiplication gives object of correct class and size", 
      {
          mm = conmat
          rownames(mm) = colnames(mm) = letters[1:3]
          c1 = coo(mm)
          c2 = coo(mm)
          result = multiply.coo(c1, c2)
          expect_equal(result$n.elements, 3)
          expect_equal(result$names, c1$names)
      })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 8. Error: multiplication gives object of correct class and size (@test_coo.R#
  the condition has length > 1
  Backtrace:
   1. umap:::coo(mm)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#152: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#151: test_that("multiplication with matrix of all-1", {
      c1 = coo(conmat)
      c2 = coo(matrix(1, ncol = 3, nrow = 3))
      result = multiply.coo(c1, c2)
      expect_equal(c1, result)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 9. Error: multiplication with matrix of all-1 (@test_coo.R#152)  ------------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#160: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#159: test_that("multiplication with matrix of all-0", {
      c1 = coo(conmat)
      c2 = coo(matrix(0, ncol = 3, nrow = 3))
      result = multiply.coo(c1, c2)
      c2.red = reduce.coo(c2)
      result.red = reduce.coo(result)
      expect_equal(c2.red, result.red)
      expect_equal(nrow(result.red$coo), 0)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 10. Error: multiplication with matrix of all-0 (@test_coo.R#160)  -----------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#175: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#174: test_that("simple add", {
      c1 = coo(conmat)
      result = add.coo(c1, c1)
      expected = c1
      expected$coo[, "value"] = c1$coo[, "value"] * 2
      expect_equal(expected, result)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 11. Error: simple add (@test_coo.R#175)  ------------------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#184: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#183: test_that("simple subtract", {
      c1 = coo(conmat)
      result = add.coo(c1, c1, a = 1, b = -1)
      expected = c1
      expected$coo[, "value"] = 0
      expect_equal(expected, result)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 12. Error: simple subtract (@test_coo.R#184)  -------------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_coo.R#192: coo(conmat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_coo.R#191: test_that("add to a zero matrix", {
      c1 = coo(conmat)
      c2 = coo(matrix(0, ncol = ncol(conmat), nrow = nrow(conmat)))
      result = add.coo(c1, c2)
      expected = c1
      expect_equal(expected, result)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 13. Error: add to a zero matrix (@test_coo.R#192)  --------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(conmat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(conmat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(conmat)
  where 2: check.coo(x, "reduce")
  where 3 at testthat/test_coo.R#207: reduce.coo(coo(conmat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_coo.R#206: test_that("matrix to coo and back", {
      c1 = reduce.coo(coo(conmat))
      c1mat = coo2mat(c1)
      expect_equal(conmat, c1mat)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 14. Error: matrix to coo and back (@test_coo.R#207)  ------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::reduce.coo(coo(conmat))
   3. umap:::coo(conmat)
  
  
  test_embedding
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  make.initial.embedding(VV, conf)
   --- call from argument --- 
  if (class(config$init) == "matrix") {
      result = config$init
  } else {
      result = NULL
      if (config$init == "spectral") {
          result = make.spectral.embedding(numcomp, g)
      }
      else if (config$init == "random") {
          result = make.random.embedding(numcomp, V)
      }
      if (is.null(result)) {
          warning("failed creating initial embedding; using random embedding instead", 
              call. = FALSE)
          result = make.random.embedding(numcomp, V)
      }
  }
   --- R stacktrace ---
  where 1 at testthat/test_embedding.R#30: make.initial.embedding(VV, conf)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_embedding.R#25: test_that("force initial embedding", {
      conf = umap.defaults
      VV = 20
      conf$init = matrix(1:4, ncol = 4, nrow = VV)
      conf$n_components = 4
      result = make.initial.embedding(VV, conf)
      expect_equal(result, conf$init)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (V, config, g = NULL) 
  {
      numcomp = config$n_components
      if (class(config$init) == "matrix") {
          result = config$init
      }
      else {
          result = NULL
          if (config$init == "spectral") {
              result = make.spectral.embedding(numcomp, g)
          }
          else if (config$init == "random") {
              result = make.random.embedding(numcomp, V)
          }
          if (is.null(result)) {
              warning("failed creating initial embedding; using random embedding instead", 
                  call. = FALSE)
              result = make.random.embedding(numcomp, V)
          }
      }
      if (nrow(result) != V) {
          umap.error("initial embedding is incompatible")
      }
      if (ncol(result) != numcomp) {
          umap.error("initial embedding is incompatible (dimension)")
      }
      result
  }
  <bytecode: 0xa338028>
  <environment: namespace:umap>
   --- function search by body ---
  Function make.initial.embedding in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 15. Error: force initial embedding (@test_embedding.R#30)  ------------------
  the condition has length > 1
  Backtrace:
   1. umap:::make.initial.embedding(VV, conf)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  make.initial.embedding(VV, conf)
   --- call from argument --- 
  if (class(config$init) == "matrix") {
      result = config$init
  } else {
      result = NULL
      if (config$init == "spectral") {
          result = make.spectral.embedding(numcomp, g)
      }
      else if (config$init == "random") {
          result = make.random.embedding(numcomp, V)
      }
      if (is.null(result)) {
          warning("failed creating initial embedding; using random embedding instead", 
              call. = FALSE)
          result = make.random.embedding(numcomp, V)
      }
  }
   --- R stacktrace ---
  where 1: make.initial.embedding(VV, conf)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 6 at testthat/test_embedding.R#41: expect_error(make.initial.embedding(VV, conf))
  where 7: eval(code, test_env)
  where 8: eval(code, test_env)
  where 9: 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 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 15: tryCatchList(expr, classes, parentenv, handlers)
  where 16: 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 17: test_code(desc, code, env = parent.frame())
  where 18 at testthat/test_embedding.R#35: test_that("report bad manual initial embeddings", {
      conf = umap.defaults
      conf$n_components = 2
      VV = nrow(i4m)
      conf$init = matrix(0, ncol = 3, nrow = nrow(i4m))
      expect_error(make.initial.embedding(VV, conf))
      conf$init = matrix(0, ncol = 2, nrow = nrow(i4m) + 2)
      expect_error(make.initial.embedding(VV, conf))
      conf$init = matrix(0, ncol = 2, nrow = nrow(i4m))
      expect_silent(make.initial.embedding(VV, conf))
  })
  where 19: eval(code, test_env)
  where 20: eval(code, test_env)
  where 21: 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 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 27: tryCatchList(expr, classes, parentenv, handlers)
  where 28: 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 29: test_code(NULL, exprs, env)
  where 30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 31: force(code)
  where 32: doWithOneRestart(return(expr), restart)
  where 33: withOneRestart(expr, restarts[[1L]])
  where 34: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 35: 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 36: FUN(X[[i]], ...)
  where 37: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 38: force(code)
  where 39: doWithOneRestart(return(expr), restart)
  where 40: withOneRestart(expr, restarts[[1L]])
  where 41: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 42: 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 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 44: 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 45: 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 46: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (V, config, g = NULL) 
  {
      numcomp = config$n_components
      if (class(config$init) == "matrix") {
          result = config$init
      }
      else {
          result = NULL
          if (config$init == "spectral") {
              result = make.spectral.embedding(numcomp, g)
          }
          else if (config$init == "random") {
              result = make.random.embedding(numcomp, V)
          }
          if (is.null(result)) {
              warning("failed creating initial embedding; using random embedding instead", 
                  call. = FALSE)
              result = make.random.embedding(numcomp, V)
          }
      }
      if (nrow(result) != V) {
          umap.error("initial embedding is incompatible")
      }
      if (ncol(result) != numcomp) {
          umap.error("initial embedding is incompatible (dimension)")
      }
      result
  }
  <bytecode: 0xa338028>
  <environment: namespace:umap>
   --- function search by body ---
  Function make.initial.embedding in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  make.initial.embedding(VV, conf)
   --- call from argument --- 
  if (class(config$init) == "matrix") {
      result = config$init
  } else {
      result = NULL
      if (config$init == "spectral") {
          result = make.spectral.embedding(numcomp, g)
      }
      else if (config$init == "random") {
          result = make.random.embedding(numcomp, V)
      }
      if (is.null(result)) {
          warning("failed creating initial embedding; using random embedding instead", 
              call. = FALSE)
          result = make.random.embedding(numcomp, V)
      }
  }
   --- R stacktrace ---
  where 1: make.initial.embedding(VV, conf)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 6 at testthat/test_embedding.R#44: expect_error(make.initial.embedding(VV, conf))
  where 7: eval(code, test_env)
  where 8: eval(code, test_env)
  where 9: 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 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 15: tryCatchList(expr, classes, parentenv, handlers)
  where 16: 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 17: test_code(desc, code, env = parent.frame())
  where 18 at testthat/test_embedding.R#35: test_that("report bad manual initial embeddings", {
      conf = umap.defaults
      conf$n_components = 2
      VV = nrow(i4m)
      conf$init = matrix(0, ncol = 3, nrow = nrow(i4m))
      expect_error(make.initial.embedding(VV, conf))
      conf$init = matrix(0, ncol = 2, nrow = nrow(i4m) + 2)
      expect_error(make.initial.embedding(VV, conf))
      conf$init = matrix(0, ncol = 2, nrow = nrow(i4m))
      expect_silent(make.initial.embedding(VV, conf))
  })
  where 19: eval(code, test_env)
  where 20: eval(code, test_env)
  where 21: 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 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 27: tryCatchList(expr, classes, parentenv, handlers)
  where 28: 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 29: test_code(NULL, exprs, env)
  where 30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 31: force(code)
  where 32: doWithOneRestart(return(expr), restart)
  where 33: withOneRestart(expr, restarts[[1L]])
  where 34: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 35: 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 36: FUN(X[[i]], ...)
  where 37: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 38: force(code)
  where 39: doWithOneRestart(return(expr), restart)
  where 40: withOneRestart(expr, restarts[[1L]])
  where 41: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 42: 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 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 44: 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 45: 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 46: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (V, config, g = NULL) 
  {
      numcomp = config$n_components
      if (class(config$init) == "matrix") {
          result = config$init
      }
      else {
          result = NULL
          if (config$init == "spectral") {
              result = make.spectral.embedding(numcomp, g)
          }
          else if (config$init == "random") {
              result = make.random.embedding(numcomp, V)
          }
          if (is.null(result)) {
              warning("failed creating initial embedding; using random embedding instead", 
                  call. = FALSE)
              result = make.random.embedding(numcomp, V)
          }
      }
      if (nrow(result) != V) {
          umap.error("initial embedding is incompatible")
      }
      if (ncol(result) != numcomp) {
          umap.error("initial embedding is incompatible (dimension)")
      }
      result
  }
  <bytecode: 0xa338028>
  <environment: namespace:umap>
   --- function search by body ---
  Function make.initial.embedding in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  make.initial.embedding(VV, conf)
   --- call from argument --- 
  if (class(config$init) == "matrix") {
      result = config$init
  } else {
      result = NULL
      if (config$init == "spectral") {
          result = make.spectral.embedding(numcomp, g)
      }
      else if (config$init == "random") {
          result = make.random.embedding(numcomp, V)
      }
      if (is.null(result)) {
          warning("failed creating initial embedding; using random embedding instead", 
              call. = FALSE)
          result = make.random.embedding(numcomp, V)
      }
  }
   --- R stacktrace ---
  where 1: make.initial.embedding(VV, conf)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withVisible(code)
  where 4: withCallingHandlers(withVisible(code), warning = handle_warning, 
      message = handle_message)
  where 5: force(code)
  where 6: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), 
      warning = handle_warning, message = handle_message))
  where 7: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 8: quasi_capture(enquo(object), NULL, evaluate_promise)
  where 9 at testthat/test_embedding.R#47: expect_silent(make.initial.embedding(VV, conf))
  where 10: eval(code, test_env)
  where 11: eval(code, test_env)
  where 12: 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 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 15: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 16: doTryCatch(return(expr), name, parentenv, handler)
  where 17: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 18: tryCatchList(expr, classes, parentenv, handlers)
  where 19: 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 20: test_code(desc, code, env = parent.frame())
  where 21 at testthat/test_embedding.R#35: test_that("report bad manual initial embeddings", {
      conf = umap.defaults
      conf$n_components = 2
      VV = nrow(i4m)
      conf$init = matrix(0, ncol = 3, nrow = nrow(i4m))
      expect_error(make.initial.embedding(VV, conf))
      conf$init = matrix(0, ncol = 2, nrow = nrow(i4m) + 2)
      expect_error(make.initial.embedding(VV, conf))
      conf$init = matrix(0, ncol = 2, nrow = nrow(i4m))
      expect_silent(make.initial.embedding(VV, conf))
  })
  where 22: eval(code, test_env)
  where 23: eval(code, test_env)
  where 24: 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 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 28: doTryCatch(return(expr), name, parentenv, handler)
  where 29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 30: tryCatchList(expr, classes, parentenv, handlers)
  where 31: 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 32: test_code(NULL, exprs, env)
  where 33: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: FUN(X[[i]], ...)
  where 40: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 41: force(code)
  where 42: doWithOneRestart(return(expr), restart)
  where 43: withOneRestart(expr, restarts[[1L]])
  where 44: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 45: 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 46: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 47: 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 48: 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 49: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (V, config, g = NULL) 
  {
      numcomp = config$n_components
      if (class(config$init) == "matrix") {
          result = config$init
      }
      else {
          result = NULL
          if (config$init == "spectral") {
              result = make.spectral.embedding(numcomp, g)
          }
          else if (config$init == "random") {
              result = make.random.embedding(numcomp, V)
          }
          if (is.null(result)) {
              warning("failed creating initial embedding; using random embedding instead", 
                  call. = FALSE)
              result = make.random.embedding(numcomp, V)
          }
      }
      if (nrow(result) != V) {
          umap.error("initial embedding is incompatible")
      }
      if (ncol(result) != numcomp) {
          umap.error("initial embedding is incompatible (dimension)")
      }
      result
  }
  <bytecode: 0xa338028>
  <environment: namespace:umap>
   --- function search by body ---
  Function make.initial.embedding in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 16. Error: report bad manual initial embeddings (@test_embedding.R#47)  -----
  the condition has length > 1
  Backtrace:
   1. testthat::expect_silent(make.initial.embedding(VV, conf))
   9. umap:::make.initial.embedding(VV, conf)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d, config$n_neighbors)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d, config$n_neighbors)
  where 2 at testthat/test_embedding.R#70: knn.info(mmdist, config)
  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(desc, code, env = parent.frame())
  where 14 at testthat/test_embedding.R#51: test_that("spectral embedding can revert to random", {
      mm = matrix(0, ncol = 2, nrow = 6)
      mm[1, ] = c(0, 0)
      mm[2, ] = c(1, 0)
      mm[3, ] = c(0, 1)
      mm[4, ] = c(100, 100)
      mm[5, ] = c(100, 101)
      mm[6, ] = c(101, 100)
      mmdist = as.matrix(dist(mm))
      config = umap.defaults
      config$init = "spectral"
      config$input = "dist"
      config$n_neighbors = 2
      config[c("a", "b")] = find.ab.params(config$spread, config$min.dist)
      knn = knn.info(mmdist, config)
      graph = naive.fuzzy.simplicial.set(knn, config)
      expect_warning(make.initial.embedding(graph$n.elements, config, 
          graph), "random")
  })
  where 15: eval(code, test_env)
  where 16: eval(code, test_env)
  where 17: 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 18: doTryCatch(return(expr), name, parentenv, handler)
  where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 23: tryCatchList(expr, classes, parentenv, handlers)
  where 24: 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 25: test_code(NULL, exprs, env)
  where 26: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 27: force(code)
  where 28: doWithOneRestart(return(expr), restart)
  where 29: withOneRestart(expr, restarts[[1L]])
  where 30: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 31: 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 32: FUN(X[[i]], ...)
  where 33: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 40: 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 41: 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 42: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 17. Error: spectral embedding can revert to random (@test_embedding.R#70)  --
  the condition has length > 1
  Backtrace:
   1. umap:::knn.info(mmdist, config)
   2. umap:::knn.from.dist(d, config$n_neighbors)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d, config$n_neighbors)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d, config$n_neighbors)
  where 2 at testthat/test_embedding.R#95: knn.info(mmdist, config)
  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(desc, code, env = parent.frame())
  where 14 at testthat/test_embedding.R#78: test_that("spectral embedding with multiple components (2D)", 
      {
          mm = matrix(0, ncol = 2, nrow = 12)
          mmdata = c(0, 0, 1, 1, 0, 1, 0, 1)
          mm[1:4, 1:2] = mmdata
          mm[5:8, 1:2] = mmdata + 100
          mm[9:12, 1:2] = mmdata + 10000
          mmdist = as.matrix(dist(mm))
          config = umap.defaults
          config$n_components = 2
          config$init = "spectral"
          config$input = "dist"
          config$n_neighbors = 3
          config[c("a", "b")] = find.ab.params(config$spread, config$min.dist)
          knn = knn.info(mmdist, config)
          graph = naive.fuzzy.simplicial.set(knn, config)
          result = make.initial.embedding(graph$n.elements, config, 
              graph)
          expect_equal(dim(result), c(12, 2))
          within.range = function(x, lim = c(-10, 10)) {
              all(x >= lim[1] & x <= lim[2])
          }
          expect_true(within.range(result[1:4, 1], c(-10, 10)))
          expect_true(within.range(result[1:4, 2], c(-10, 10)))
          expect_true(within.range(result[5:8, 1], c(10, 30)))
          expect_true(within.range(result[5:8, 2], c(-10, 10)))
          expect_true(within.range(result[9:12, 1], c(-10, 10)))
          expect_true(within.range(result[9:12, 2], c(10, 30)))
      })
  where 15: eval(code, test_env)
  where 16: eval(code, test_env)
  where 17: 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 18: doTryCatch(return(expr), name, parentenv, handler)
  where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 23: tryCatchList(expr, classes, parentenv, handlers)
  where 24: 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 25: test_code(NULL, exprs, env)
  where 26: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 27: force(code)
  where 28: doWithOneRestart(return(expr), restart)
  where 29: withOneRestart(expr, restarts[[1L]])
  where 30: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 31: 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 32: FUN(X[[i]], ...)
  where 33: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 40: 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 41: 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 42: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 18. Error: spectral embedding with multiple components (2D) (@test_embedding.
  the condition has length > 1
  Backtrace:
   1. umap:::knn.info(mmdist, config)
   2. umap:::knn.from.dist(d, config$n_neighbors)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d, config$n_neighbors)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d, config$n_neighbors)
  where 2 at testthat/test_embedding.R#135: knn.info(mmdist, config)
  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(desc, code, env = parent.frame())
  where 14 at testthat/test_embedding.R#118: test_that("spectral embedding with multiple components (1D)", 
      {
          mm = matrix(0, ncol = 2, nrow = 12)
          mmdata = c(0, 0, 1, 1, 0, 1, 0, 1)
          mm[1:4, 1:2] = mmdata
          mm[5:8, 1:2] = mmdata + 100
          mm[9:12, 1:2] = mmdata + 10000
          mmdist = as.matrix(dist(mm))
          config = umap.defaults
          config$n_components = 1
          config$init = "spectral"
          config$input = "dist"
          config$n_neighbors = 3
          config[c("a", "b")] = find.ab.params(config$spread, config$min.dist)
          knn = knn.info(mmdist, config)
          graph = naive.fuzzy.simplicial.set(knn, config)
          result = make.initial.embedding(graph$n.elements, config, 
              graph)
          expect_equal(dim(result), c(12, 1))
          within.range = function(x, lim = c(-10, 10)) {
              all(x >= lim[1] & x <= lim[2])
          }
          expect_true(within.range(result[1:4, 1], c(-10, 10)))
          expect_true(within.range(result[5:8, 1], c(10, 30)))
          expect_true(within.range(result[9:12, 1], c(30, 50)))
      })
  where 15: eval(code, test_env)
  where 16: eval(code, test_env)
  where 17: 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 18: doTryCatch(return(expr), name, parentenv, handler)
  where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 23: tryCatchList(expr, classes, parentenv, handlers)
  where 24: 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 25: test_code(NULL, exprs, env)
  where 26: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 27: force(code)
  where 28: doWithOneRestart(return(expr), restart)
  where 29: withOneRestart(expr, restarts[[1L]])
  where 30: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 31: 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 32: FUN(X[[i]], ...)
  where 33: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 40: 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 41: 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 42: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 19. Error: spectral embedding with multiple components (1D) (@test_embedding.
  the condition has length > 1
  Backtrace:
   1. umap:::knn.info(mmdist, config)
   2. umap:::knn.from.dist(d, config$n_neighbors)
  
  
  test_knn
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4: umap(i.train, n_neighbors = 10, random_state = 123)
  where 5: eval(ei, envir)
  where 6: eval(ei, envir)
  where 7: withVisible(eval(ei, envir))
  where 8 at testthat/test_knn.R#5: source("train_test.R")
  where 9: eval(code, test_env)
  where 10: eval(code, test_env)
  where 11: 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 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 14: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 15: doTryCatch(return(expr), name, parentenv, handler)
  where 16: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 17: tryCatchList(expr, classes, parentenv, handlers)
  where 18: 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 19: test_code(NULL, exprs, env)
  where 20: source_file(path, new.env(parent = env), chdir = TRUE, 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 = 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 26: FUN(X[[i]], ...)
  where 27: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 34: 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 35: 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 36: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 20. Error: (unknown) (@test_knn.R#5)  ---------------------------------------
  the condition has length > 1
  Backtrace:
   1. base::source("train_test.R")
   5. umap::umap(i.train, n_neighbors = 10, random_state = 123)
   6. implementations[[method]](d, config)
   7. umap:::knn.info(d, config)
   8. umap:::knn.from.dist(d.dist, k)
  
  
  test_methods
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_methods.R#32: umap(i4, conf)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_methods.R#21: test_that("reproducible output when seed is set", {
      conf = umap.defaults
      conf$random_state = 102030405
      conf$init = "random"
      conf$n_epochs = 2
      set.seed(9001)
      r1 = runif(1)
      set.seed(9001)
      result.a = umap(i4, conf)
      result.b = umap(i4, conf)
      r2 = runif(1)
      abdiff = sum(abs(result.a$laytout - result.b$layout))
      expect_equal(result.a, result.b, tolerance = 1e-04)
      expect_equal(r1, r2, tolerance = 1e-04)
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 21. Error: reproducible output when seed is set (@test_methods.R#32)  -------
  the condition has length > 1
  Backtrace:
   1. umap::umap(i4, conf)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_methods.R#49: umap(data, conf)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_methods.R#43: test_that("output with rownames", {
      conf = umap.defaults
      conf$n_epochs = 2
      conf$init = "random"
      data = i4
      rownames(data) = paste0("S", 1:nrow(i4))
      result = umap(data, conf)
      expect_equal(rownames(result$layout), rownames(data))
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 22. Error: output with rownames (@test_methods.R#49)  -----------------------
  the condition has length > 1
  Backtrace:
   1. umap::umap(data, conf)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_methods.R#67: umap(data, conf, n_neighbors = 3)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_methods.R#60: test_that("accept parameters in main function", {
      conf = umap.defaults
      conf$n_neighbors = 5
      conf$n_epochs = 2
      conf$init = "random"
      data = i4
      result = umap(data, conf, n_neighbors = 3)
      expect_equal(result$config$n_neighbors, 3)
      expect_equal(ncol(result$knn$indexes), 3)
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 23. Error: accept parameters in main function (@test_methods.R#67)  ---------
  the condition has length > 1
  Backtrace:
   1. umap::umap(data, conf, n_neighbors = 3)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_methods.R#79: umap(data, conf)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_methods.R#73: test_that("supply knn in main", {
      conf = umap.defaults
      conf$n_neighbors = 5
      conf$n_epochs = 2
      conf$init = "random"
      data = i4
      result1 = umap(data, conf)
      result2 = umap(data, conf, knn = result1$knn)
      expect_equal(result1$knn, result2$knn)
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 24. Error: supply knn in main (@test_methods.R#79)  -------------------------
  the condition has length > 1
  Backtrace:
   1. umap::umap(data, conf)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4: umap(i4, conf)
  where 5: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 6: withCallingHandlers(code, message = function(condition) {
      out$push(condition)
      maybe_restart("muffleMessage")
  })
  where 7: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 8: quasi_capture(enquo(object), label, capture_messages)
  where 9 at testthat/test_methods.R#96: expect_message(umap(i4, conf), "starting")
  where 10: eval(code, test_env)
  where 11: eval(code, test_env)
  where 12: 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 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 15: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 16: doTryCatch(return(expr), name, parentenv, handler)
  where 17: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 18: tryCatchList(expr, classes, parentenv, handlers)
  where 19: 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 20: test_code(desc, code, env = parent.frame())
  where 21 at testthat/test_methods.R#91: test_that("log messages in verbose mode", {
      conf = umap.defaults
      conf$verbose = TRUE
      conf$init = "random"
      conf$n_epochs = 0
      expect_message(umap(i4, conf), "starting")
      expect_message(umap(i4, conf), "creating")
  })
  where 22: eval(code, test_env)
  where 23: eval(code, test_env)
  where 24: 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 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 28: doTryCatch(return(expr), name, parentenv, handler)
  where 29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 30: tryCatchList(expr, classes, parentenv, handlers)
  where 31: 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 32: test_code(NULL, exprs, env)
  where 33: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: FUN(X[[i]], ...)
  where 40: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 41: force(code)
  where 42: doWithOneRestart(return(expr), restart)
  where 43: withOneRestart(expr, restarts[[1L]])
  where 44: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 45: 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 46: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 47: 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 48: 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 49: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 25. Error: log messages in verbose mode (@test_methods.R#96)  ---------------
  the condition has length > 1
  Backtrace:
   1. testthat::expect_message(umap(i4, conf), "starting")
   6. umap::umap(i4, conf)
   7. implementations[[method]](d, config)
   8. umap:::knn.info(d, config)
   9. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4: umap(i4, conf)
  where 5: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  where 6 at testthat/test_methods.R#106: suppressMessages(umap(i4, conf))
  where 7: eval(code, test_env)
  where 8: eval(code, test_env)
  where 9: 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 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 15: tryCatchList(expr, classes, parentenv, handlers)
  where 16: 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 17: test_code(desc, code, env = parent.frame())
  where 18 at testthat/test_methods.R#101: test_that("log messages during prediction verbose mode", {
      conf = umap.defaults
      conf$verbose = TRUE
      conf$init = "random"
      conf$n_epochs = 0
      u4 = suppressMessages(umap(i4, conf))
      expect_message(predict(u4, i4), "creating")
      expect_message(predict(u4, i4), "optimizing")
  })
  where 19: eval(code, test_env)
  where 20: eval(code, test_env)
  where 21: 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 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 27: tryCatchList(expr, classes, parentenv, handlers)
  where 28: 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 29: test_code(NULL, exprs, env)
  where 30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 31: force(code)
  where 32: doWithOneRestart(return(expr), restart)
  where 33: withOneRestart(expr, restarts[[1L]])
  where 34: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 35: 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 36: FUN(X[[i]], ...)
  where 37: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 38: force(code)
  where 39: doWithOneRestart(return(expr), restart)
  where 40: withOneRestart(expr, restarts[[1L]])
  where 41: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 42: 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 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 44: 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 45: 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 46: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 26. Error: log messages during prediction verbose mode (@test_methods.R#106) 
  the condition has length > 1
  Backtrace:
   1. base::suppressMessages(umap(i4, conf))
   3. umap::umap(i4, conf)
   4. implementations[[method]](d, config)
   5. umap:::knn.info(d, config)
   6. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_methods.R#119: umap(data, conf)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_methods.R#112: test_that("use of supplied knn", {
      conf = umap.defaults
      conf$n_neighbors = 3
      conf$n_epochs = 2
      conf$init = "random"
      data = i4
      result1 = umap(data, conf)
      expect_message(umap(data, conf, verbose = TRUE, knn = result1$knn), 
          "supplied")
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 27. Error: use of supplied knn (@test_methods.R#119)  -----------------------
  the condition has length > 1
  Backtrace:
   1. umap::umap(data, conf)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_methods.R#135: umap(ilarge, conf)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_methods.R#130: test_that("spectral layout on two component data", {
      ilarge = rbind(i4, i4 + 100)
      conf = umap.defaults
      conf$n_epochs = 0
      result = umap(ilarge, conf)$layout
      expect_equal(dim(result), c(nrow(ilarge), 2))
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 28. Error: spectral layout on two component data (@test_methods.R#135)  -----
  the condition has length > 1
  Backtrace:
   1. umap::umap(ilarge, conf)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4: umap(ismall, conf)
  where 5: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 6: withCallingHandlers(code, warning = function(condition) {
      out$push(condition)
      maybe_restart("muffleWarning")
  })
  where 7: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 8: quasi_capture(enquo(object), label, capture_warnings)
  where 9 at testthat/test_methods.R#145: expect_warning(umap(ismall, conf), "init")
  where 10: eval(code, test_env)
  where 11: eval(code, test_env)
  where 12: 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 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 15: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 16: doTryCatch(return(expr), name, parentenv, handler)
  where 17: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 18: tryCatchList(expr, classes, parentenv, handlers)
  where 19: 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 20: test_code(desc, code, env = parent.frame())
  where 21 at testthat/test_methods.R#140: test_that("spectral layout aborts and uses random init with small datasets", 
      {
          ismall = i4[1:3, ]
          conf = umap.defaults
          conf$n_epochs = 2
          conf$n_neighbors = 3
          expect_warning(umap(ismall, conf), "init")
      })
  where 22: eval(code, test_env)
  where 23: eval(code, test_env)
  where 24: 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 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 28: doTryCatch(return(expr), name, parentenv, handler)
  where 29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 30: tryCatchList(expr, classes, parentenv, handlers)
  where 31: 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 32: test_code(NULL, exprs, env)
  where 33: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: FUN(X[[i]], ...)
  where 40: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 41: force(code)
  where 42: doWithOneRestart(return(expr), restart)
  where 43: withOneRestart(expr, restarts[[1L]])
  where 44: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 45: 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 46: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 47: 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 48: 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 49: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 29. Error: spectral layout aborts and uses random init with small datasets (@
  the condition has length > 1
  Backtrace:
   1. testthat::expect_warning(umap(ismall, conf), "init")
   6. umap::umap(ismall, conf)
   7. implementations[[method]](d, config)
   8. umap:::knn.info(d, config)
   9. umap:::knn.from.dist(d.dist, k)
  
  
  test_naive
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4: umap(i.train, n_neighbors = 10, random_state = 123)
  where 5: eval(ei, envir)
  where 6: eval(ei, envir)
  where 7: withVisible(eval(ei, envir))
  where 8 at testthat/test_naive.R#5: source("train_test.R")
  where 9: eval(code, test_env)
  where 10: eval(code, test_env)
  where 11: 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 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 14: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 15: doTryCatch(return(expr), name, parentenv, handler)
  where 16: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 17: tryCatchList(expr, classes, parentenv, handlers)
  where 18: 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 19: test_code(NULL, exprs, env)
  where 20: source_file(path, new.env(parent = env), chdir = TRUE, 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 = 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 26: FUN(X[[i]], ...)
  where 27: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 34: 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 35: 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 36: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 30. Error: (unknown) (@test_naive.R#5)  -------------------------------------
  the condition has length > 1
  Backtrace:
   1. base::source("train_test.R")
   5. umap::umap(i.train, n_neighbors = 10, random_state = 123)
   6. implementations[[method]](d, config)
   7. umap:::knn.info(d, config)
   8. umap:::knn.from.dist(d.dist, k)
  
  
  test_predict
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_predict.R#17: umap(i.train, conf.testing)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(NULL, exprs, env)
  where 16: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 17: force(code)
  where 18: doWithOneRestart(return(expr), restart)
  where 19: withOneRestart(expr, restarts[[1L]])
  where 20: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 21: 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 22: FUN(X[[i]], ...)
  where 23: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 24: force(code)
  where 25: doWithOneRestart(return(expr), restart)
  where 26: withOneRestart(expr, restarts[[1L]])
  where 27: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 28: 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 29: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 30: 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 31: 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 32: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 31. Error: (unknown) (@test_predict.R#17)  ----------------------------------
  the condition has length > 1
  Backtrace:
   1. umap::umap(i.train, conf.testing)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
  
  test_print
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  FUN(X[[i]], ...)
   --- call from argument --- 
  if (class(zval) %in% c("numeric", "integer", "character", "logical")) {
      message(padspaces(z), paste(zval, collapse = " "))
  } else {
      message(padspaces(z), "[", class(zval), "]")
  }
   --- R stacktrace ---
  where 1: FUN(X[[i]], ...)
  where 2: lapply(X = X, FUN = FUN, ...)
  where 3: sapply(names(x), function(z) {
      zval = x[[z]]
      if (class(zval) %in% c("numeric", "integer", "character", 
          "logical")) {
          message(padspaces(z), paste(zval, collapse = " "))
      }
      else {
          message(padspaces(z), "[", class(zval), "]")
      }
  })
  where 4: print.umap.config(conf)
  where 5: print(conf)
  where 6: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 7: withCallingHandlers(code, message = function(condition) {
      out$push(condition)
      maybe_restart("muffleMessage")
  })
  where 8: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 9: quasi_capture(enquo(object), label, capture_messages)
  where 10 at testthat/test_print.R#38: expect_message(print(conf), "matrix")
  where 11: eval(code, test_env)
  where 12: eval(code, test_env)
  where 13: 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 14: doTryCatch(return(expr), name, parentenv, handler)
  where 15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 19: tryCatchList(expr, classes, parentenv, handlers)
  where 20: 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 21: test_code(desc, code, env = parent.frame())
  where 22 at testthat/test_print.R#35: test_that("print display placeholder instead of matrix", {
      conf = umap.defaults
      conf$init = matrix(0, ncol = 2, nrow = 4)
      expect_message(print(conf), "matrix")
  })
  where 23: eval(code, test_env)
  where 24: eval(code, test_env)
  where 25: 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 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 29: doTryCatch(return(expr), name, parentenv, handler)
  where 30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 31: tryCatchList(expr, classes, parentenv, handlers)
  where 32: 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 33: test_code(NULL, exprs, env)
  where 34: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: FUN(X[[i]], ...)
  where 41: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 42: force(code)
  where 43: doWithOneRestart(return(expr), restart)
  where 44: withOneRestart(expr, restarts[[1L]])
  where 45: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 46: 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 47: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 48: 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 49: 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 50: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (z) 
  {
      zval = x[[z]]
      if (class(zval) %in% c("numeric", "integer", "character", 
          "logical")) {
          message(padspaces(z), paste(zval, collapse = " "))
      }
      else {
          message(padspaces(z), "[", class(zval), "]")
      }
  }
  <bytecode: 0xa320c58>
  <environment: 0x8f26a90>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  -- 32. Error: print display placeholder instead of matrix (@test_print.R#38)  --
  the condition has length > 1
  Backtrace:
    1. testthat::expect_message(print(conf), "matrix")
    7. umap:::print.umap.config(conf)
    8. base::sapply(...)
    9. base::lapply(X = X, FUN = FUN, ...)
   10. umap:::FUN(X[[i]], ...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2: knn.info(d, config)
  where 3: implementations[[method]](d, config)
  where 4 at testthat/test_print.R#55: umap(mat, n_epochs = 2, n_neighbors = 3)
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_print.R#52: test_that("print displays summary of umap result", {
      mat = matrix(1:36, ncol = 2)
      result = umap(mat, n_epochs = 2, n_neighbors = 3)
      expect_message(print(result), "umap")
      expect_message(print(result$knn), "k=3")
      expect_message(print(result$knn), "approximate")
  })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 33. Error: print displays summary of umap result (@test_print.R#55)  --------
  the condition has length > 1
  Backtrace:
   1. umap::umap(mat, n_epochs = 2, n_neighbors = 3)
   2. implementations[[method]](d, config)
   3. umap:::knn.info(d, config)
   4. umap:::knn.from.dist(d.dist, k)
  
  
  test_python
  
  test_rcpp
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(d.dist, k)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1: knn.from.dist(d.dist, k)
  where 2 at testthat/test_rcpp.R#101: knn.info(i4, conf)
  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(desc, code, env = parent.frame())
  where 14 at testthat/test_rcpp.R#95: test_that("layout optimization", {
      conf = umap.defaults
      conf$n.neighbors = 3
      conf$n.epochs = 2
      conf = umap.check.config(conf)
      i4 = iris[c(1:5, 61:65, 111:115), 1:4]
      knn = knn.info(i4, conf)
      graph = naive.fuzzy.simplicial.set(knn, conf)
      embedding = make.initial.embedding(graph$n.elements, conf, 
          graph)
      embedding = naive.simplicial.set.embedding(graph, embedding, 
          conf)
      expect_equal(dim(embedding), c(nrow(i4), 2))
  })
  where 15: eval(code, test_env)
  where 16: eval(code, test_env)
  where 17: 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 18: doTryCatch(return(expr), name, parentenv, handler)
  where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 23: tryCatchList(expr, classes, parentenv, handlers)
  where 24: 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 25: test_code(NULL, exprs, env)
  where 26: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 27: force(code)
  where 28: doWithOneRestart(return(expr), restart)
  where 29: withOneRestart(expr, restarts[[1L]])
  where 30: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 31: 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 32: FUN(X[[i]], ...)
  where 33: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 34: force(code)
  where 35: doWithOneRestart(return(expr), restart)
  where 36: withOneRestart(expr, restarts[[1L]])
  where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 38: 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 39: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 40: 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 41: 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 42: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 34. Error: layout optimization (@test_rcpp.R#101)  --------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::knn.info(i4, conf)
   2. umap:::knn.from.dist(d.dist, k)
  
  
  test small
  
  test_spectral
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "submat")
  where 3 at testthat/test_spectral.R#17: concomp.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#9: test_that("count components in single-component", {
      mat = matrix(0, ncol = 6, nrow = 6)
      mat[1, c(2, 3)] = 1
      mat[2, c(3, 4)] = 1
      mat[3, c(4, 5)] = 1
      mat[4, c(5, 6)] = 1
      mat[5, c(6)] = 1
      mat = mat + t(mat)
      result = concomp.coo(coo(mat))
      expect_equal(result$n.components, 1)
      expect_equal(result$components, rep(0, 6))
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 35. Error: count components in single-component (@test_spectral.R#17)  ------
  the condition has length > 1
  Backtrace:
   1. umap:::concomp.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "submat")
  where 3 at testthat/test_spectral.R#30: concomp.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#23: test_that("count components, one two roughly equal-size components", 
      {
          mat = matrix(0, ncol = 6, nrow = 6)
          mat[1, c(2, 3)] = 1
          mat[2, c(3)] = 1
          mat[4, c(5, 6)] = 1
          mat[5, c(6)] = 1
          mat = mat + t(mat)
          result = concomp.coo(coo(mat))
          expect_equal(result$n.components, 2)
          expect_equal(result$components, c(rep(0, 3), rep(1, 3)))
      })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 36. Error: count components, one two roughly equal-size components (@test_spe
  the condition has length > 1
  Backtrace:
   1. umap:::concomp.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "submat")
  where 3 at testthat/test_spectral.R#42: concomp.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#36: test_that("count components, one disjoint element", {
      mat = matrix(0, ncol = 6, nrow = 6)
      mat[1, c(2, 3)] = 1
      mat[2, c(3)] = 1
      mat[4, c(5)] = 1
      mat = mat + t(mat)
      result = concomp.coo(coo(mat))
      expect_equal(result$n.components, 3)
      expect_equal(result$components, c(rep(0, 3), rep(1, 2), 2))
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 37. Error: count components, one disjoint element (@test_spectral.R#42)  ----
  the condition has length > 1
  Backtrace:
   1. umap:::concomp.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "submat")
  where 3 at testthat/test_spectral.R#50: concomp.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#48: test_that("count components, null matrix", {
      mat = matrix(0, ncol = 6, nrow = 6)
      result = concomp.coo(coo(mat))
      expect_equal(result$n.components, 6)
      expect_equal(result$components, 0:5)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 38. Error: count components, null matrix (@test_spectral.R#50)  -------------
  the condition has length > 1
  Backtrace:
   1. umap:::concomp.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(diag(4))
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(diag(4))
  where 2: check.coo(x, "reduce")
  where 3 at testthat/test_spectral.R#64: reduce.coo(coo(diag(4)))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#62: test_that("simple identity coo", {
      result = identity.coo(4)
      expected = reduce.coo(coo(diag(4)))
      expect_equal(result, expected)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 39. Error: simple identity coo (@test_spectral.R#64)  -----------------------
  the condition has length > 1
  Backtrace:
   1. umap:::reduce.coo(coo(diag(4)))
   3. umap:::coo(diag(4))
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "reduce")
  where 3 at testthat/test_spectral.R#79: reduce.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#75: test_that("identity with names", {
      result = identity.coo(4, letters[1:4])
      mat = diag(4)
      rownames(mat) = colnames(mat) = letters[1:4]
      expected = reduce.coo(coo(mat))
      expect_equal(result, expected)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 40. Error: identity with names (@test_spectral.R#79)  -----------------------
  the condition has length > 1
  Backtrace:
   1. umap:::reduce.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "laplacian")
  where 3 at testthat/test_spectral.R#100: laplacian.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#90: test_that("laplacian of matrix", {
      mat = matrix(0, ncol = 6, nrow = 6)
      mat[1, c(2, 3)] = 1
      mat[2, c(3, 4)] = 1
      mat[3, c(4, 5)] = 1
      mat[4, c(5, 6)] = 1
      mat[5, c(6)] = 1
      mat = mat + t(mat)
      result = laplacian.coo(coo(mat))
      degrees = apply(mat, 1, sum)
      D = diag(1/sqrt(degrees))
      I = diag(nrow(mat))
      L = I - (D %*% mat %*% D)
      expected = reduce.coo(coo(L))
      expect_equal(result, expected)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 41. Error: laplacian of matrix (@test_spectral.R#100)  ----------------------
  the condition has length > 1
  Backtrace:
   1. umap:::laplacian.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "laplacian")
  where 3 at testthat/test_spectral.R#119: laplacian.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#113: test_that("laplacian of graph matrix", {
      mat = matrix(abs(rnorm(20 * 20)), ncol = 20)
      diag(mat) = 0
      result = laplacian.coo(coo(mat))
      degrees = apply(mat, 1, sum)
      D = diag(1/sqrt(degrees))
      I = diag(nrow(mat))
      L = I - (D %*% mat %*% D)
      expected = reduce.coo(coo(L))
      expect_equal(result, expected, tolerance = 0.001)
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 42. Error: laplacian of graph matrix (@test_spectral.R#119)  ----------------
  the condition has length > 1
  Backtrace:
   1. umap:::laplacian.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1: coo(mat)
  where 2: check.coo(x, "reduce")
  where 3 at testthat/test_spectral.R#135: reduce.coo(coo(mat))
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: 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 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_spectral.R#132: test_that("laplacian of matrix with zeros", {
      mat = matrix(1:36, ncol = 6, nrow = 6)
      mat[3, ] = 0
      matcoo = reduce.coo(coo(mat))
      expect_error(laplacian.coo(matcoo))
  })
  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(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: 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 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: 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 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: 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 42: 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 43: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 43. Error: laplacian of matrix with zeros (@test_spectral.R#135)  -----------
  the condition has length > 1
  Backtrace:
   1. umap:::reduce.coo(coo(mat))
   3. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_spectral.R#149: coo(mat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_spectral.R#146: test_that("subset coo detects early exit", {
      mat = matrix(1:9, ncol = 3, nrow = 3)
      diag(mat) = 0
      c1 = coo(mat)
      result = subset.coo(c1, 1:3)
      expect_equal(result, c1)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 44. Error: subset coo detects early exit (@test_spectral.R#149)  ------------
  the condition has length > 1
  Backtrace:
   1. umap:::coo(mat)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  coo(mat)
   --- call from argument --- 
  if (class(x) != "matrix") {
      stop("x must be a square matrix\n")
  }
   --- R stacktrace ---
  where 1 at testthat/test_spectral.R#158: coo(mat)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_spectral.R#155: test_that("subset operates and produces a new coo", {
      mat = matrix(1:16, ncol = 4, nrow = 4)
      diag(mat) = 0
      c1 = coo(mat)
      keep = c(1, 3)
      result = subset.coo(c1, keep)
      expected = mat[keep, keep]
      expect_equal(result, coo(expected))
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (x) 
  {
      if (class(x) != "matrix") {
          stop("x must be a square matrix\n")
      }
      if (nrow(x) != ncol(x)) {
          stop("x must be a square matrix\n")
      }
      nx = nrow(x)
      coo = matrix(0, ncol = 3, nrow = nx * nx)
      coo[, 1] = rep(1:nx, nx)
      coo[, 2] = rep(1:nx, each = nx)
      coo[, 3] = as.vector(x)
      colnames(coo) = c("from", "to", "value")
      coo = coo[order(coo[, 1], coo[, 2]), ]
      make.coo(coo, rownames(x), nrow(x))
  }
  <bytecode: 0xa2a5878>
  <environment: namespace:umap>
   --- function search by body ---
  Function coo in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 45. Error: subset operates and produces a new coo (@test_spectral.R#158)  ---
  the condition has length > 1
  Backtrace:
   1. umap:::coo(mat)
  
  
  test_synthetic
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(as.matrix(syn0.dist), 5)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1 at testthat/test_synthetic.R#8: knn.from.dist(as.matrix(syn0.dist), 5)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_synthetic.R#7: test_that("synthetic knn.info", {
      data.knn.info = knn.from.dist(as.matrix(syn0.dist), 5)
      expected.indexes = matrix(c(0, 1, 2, 4, 3, 1, 2, 0, 4, 3, 
          2, 1, 0, 4, 3, 3, 4, 5, 2, 1, 4, 3, 5, 2, 1, 5, 3, 4, 
          2, 1, 6, 8, 7, 2, 1, 7, 6, 8, 2, 1, 8, 6, 7, 2, 1), ncol = 5, 
          nrow = 9, byrow = T)
      expected.indexes = expected.indexes + 1
      rownames(expected.indexes) = rownames(syn0)
      expect_equal(data.knn.info$indexes, expected.indexes)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 46. Error: synthetic knn.info (@test_synthetic.R#8)  ------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::knn.from.dist(as.matrix(syn0.dist), 5)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  umap
   --- call from context --- 
  knn.from.dist(as.matrix(syn0.dist), 5)
   --- call from argument --- 
  if (class(d) == "dist") {
      d = as.matrix(d)
  }
   --- R stacktrace ---
  where 1 at testthat/test_synthetic.R#22: knn.from.dist(as.matrix(syn0.dist), 5)
  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(desc, code, env = parent.frame())
  where 13 at testthat/test_synthetic.R#21: test_that("synthetic smooth", {
      info = knn.from.dist(as.matrix(syn0.dist), 5)
      smooth = smooth.knn.dist(info$distance, 5)
      expected.distances = c(1.14962769, 1.20117188, 1.19216919, 
          1.23526001, 1.21936035, 1.04608154, 1.88842773, 1.38781738, 
          1.83068848)
      expected.nearest = c(0.53851648, 0.24494897, 0.24494897, 
          0.24494897, 0.24494897, 0.58309519, 0.3, 0.48989795, 
          0.3)
      expect_equal(smooth$distances, expected.distances, tolerance = 1e-04)
      expect_equal(smooth$nearest, expected.nearest, tolerance = 1e-04)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("umap")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (d, k) 
  {
      if (class(d) == "dist") {
          d = as.matrix(d)
      }
      k = floor(k)
      if (k > ncol(d)) {
          umap.error("number of neighbors must be smaller than number of items")
      }
      if (k <= 1) {
          umap.error("number of neighbors must be greater than 1")
      }
      items = 1:ncol(d)
      indexes = t(apply(d, 1, function(x) {
          items[order(x)][1:k]
      }))
      distances = matrix(0, ncol = k, nrow = nrow(d))
      for (i in 1:nrow(d)) {
          distances[i, ] = d[i, indexes[i, ]]
      }
      rownames(indexes) = rownames(distances) = rownames(d)
      list(indexes = indexes, distances = distances)
  }
  <bytecode: 0xa3cf8d0>
  <environment: namespace:umap>
   --- function search by body ---
  Function knn.from.dist in namespace umap has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 47. Error: synthetic smooth (@test_synthetic.R#22)  -------------------------
  the condition has length > 1
  Backtrace:
   1. umap:::knn.from.dist(as.matrix(syn0.dist), 5)
  
  
  test_universal
  
  test_utils
  == testthat results  ===========================================================
  [ OK: 94 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 47 ]
  1. Error: coo construction from matrix without names (@test_coo.R#18) 
  2. Error: coo construction from matrix with names (@test_coo.R#27) 
  3. Error: coo in simple matrix (@test_coo.R#34) 
  4. Error: simplify coo with zeros, default settings (@test_coo.R#76) 
  5. Error: simplify coo, to just one row (@test_coo.R#92) 
  6. Error: coo of transpose is the same as transpose of coo (@test_coo.R#106) 
  7. Error: multiplication between incompatible objects (@test_coo.R#124) 
  8. Error: multiplication gives object of correct class and size (@test_coo.R#143) 
  9. Error: multiplication with matrix of all-1 (@test_coo.R#152) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted