Running 'testthat.R' [11s/12s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(iNEXT)
  > 
  > test_check("iNEXT")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  iNEXT
   --- call from context --- 
  FUN(X[[i]], ...)
   --- call from argument --- 
  if (class(x) == "data.frame" | class(x) == "matrix") {
      a <- sort(as.numeric(unique(c(unlist(x)))))
      if (!identical(a, c(0, 1))) {
          warning("Invalid data type, the element of species by sites presence-absence matrix should be 0 or 1. Set nonzero elements as 1.")
          x <- (x > 0)
      }
      nT <- ncol(x)
      y <- rowSums(x)
      y <- c(nT, y)
      y
  } else if (class(x) == "numeric" | class(x) == "integer" | class(x) == 
      "double") {
      warnings("Ambiguous data type, the input object is a vector. Set total number of sampling units as 1.")
      c(1, x)
  } else {
      stop("Invalid data type, it should be a data.frame or matrix.")
  }
   --- R stacktrace ---
  where 1: FUN(X[[i]], ...)
  where 2: lapply(x, as.incfreq)
  where 3 at testthat/test-iNEXT.R#51: iNEXT(ciliates, q = 0, datatype = "incidence_raw")
  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-iNEXT.R#47: test_that("iNEXT for species by sampling-units incidence matrix", 
      {
          data(ciliates)
          options(warn = -1)
          out <- iNEXT(ciliates, q = 0, datatype = "incidence_raw")
          expect_is(out, "iNEXT")
          expect_output(str(out), "List of 3")
          expect_equal(names(out$DataInfo)[2], "T")
          expect_equal(nrow(out$DataInfo), length(ciliates))
          x <- ciliates$EtoshaPan
          expect_equal(class(x), "matrix")
          out <- iNEXT(x, q = 0, datatype = "incidence_raw")
          expect_is(out, "iNEXT")
          expect_output(str(out), "List of 3")
          expect_equal(names(out$DataInfo)[2], "T")
          expect_equal(nrow(out$DataInfo), 1)
      })
  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("iNEXT")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (x) 
  {
      if (class(x) == "data.frame" | class(x) == "matrix") {
          a <- sort(as.numeric(unique(c(unlist(x)))))
          if (!identical(a, c(0, 1))) {
              warning("Invalid data type, the element of species by sites presence-absence matrix should be 0 or 1. Set nonzero elements as 1.")
              x <- (x > 0)
          }
          nT <- ncol(x)
          y <- rowSums(x)
          y <- c(nT, y)
          y
      }
      else if (class(x) == "numeric" | class(x) == "integer" | 
          class(x) == "double") {
          warnings("Ambiguous data type, the input object is a vector. Set total number of sampling units as 1.")
          c(1, x)
      }
      else {
          stop("Invalid data type, it should be a data.frame or matrix.")
      }
  }
  <bytecode: 0x26d7018>
  <environment: namespace:iNEXT>
   --- function search by body ---
  Function as.incfreq in namespace iNEXT has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 1. Error: iNEXT for species by sampling-units incidence matrix (@test-iNEXT.R
  the condition has length > 1
  Backtrace:
   1. iNEXT::iNEXT(ciliates, q = 0, datatype = "incidence_raw")
   2. base::lapply(x, as.incfreq)
   3. iNEXT:::FUN(X[[i]], ...)
  
  == testthat results  ===========================================================
  [ OK: 20 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
  1. Error: iNEXT for species by sampling-units incidence matrix (@test-iNEXT.R#51) 
  
  Error: testthat unit tests failed
  Execution halted