Running 'testthat.R' [13s/15s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(ungroup)
  > 
  > test_check("ungroup")
     Ungrouping data       ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ungroup
   --- call from context --- 
  eval(substitute(expr), data, enclos = parent.frame())
   --- call from argument --- 
  if (L) f1(fit) else apply(fit, 2, FUN = f1)
   --- R stacktrace ---
  where 1: eval(substitute(expr), data, enclos = parent.frame())
  where 2: eval(substitute(expr), data, enclos = parent.frame())
  where 3: with.default(M, if (L) f1(fit) else apply(fit, 2, FUN = f1))
  where 4: with(M, if (L) f1(fit) else apply(fit, 2, FUN = f1))
  where 5: delete.artificial.bin(R)
  where 6 at testthat/test_pclm2D.R#34: pclm2D(x, y2, nlast)
  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(NULL, exprs, env)
  where 18: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 19: force(code)
  where 20: doWithOneRestart(return(expr), restart)
  where 21: withOneRestart(expr, restarts[[1L]])
  where 22: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 23: 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 24: FUN(X[[i]], ...)
  where 25: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, 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 = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 31: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 32: 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 33: 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 34: test_check("ungroup")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1