Running 'testthat.R' [7s/8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(treenomial)
  > 
  > test_check("treenomial")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  alignPoly(coeffs)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
          }
          else {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "tipLabel")
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1 at testthat/test-coeff-building.R#38: alignPoly(coeffs)
  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-coeff-building.R#34: test_that("test different size trees to real polynomials", {
      differentSizeTrees <- c(rtree(2), rmtree(10, 10))
      coeffs <- treeToPoly(differentSizeTrees, numThreads = 0)
      coeffs <- alignPoly(coeffs)
      firstDims <- dim(coeffs[[1]])
      res <- lapply(coeffs, function(i) dim(i) == firstDims)
      expect_condition(all(res))
  })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices) 
  {
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                  }
                  else {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "tipLabel")
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      return(coefficientMatrices)
  }
  <bytecode: 0x3c4ee90>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function alignPoly in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 1. Error: test different size trees to real polynomials (@test-coeff-building
  the condition has length > 1
  Backtrace:
   1. treenomial::alignPoly(coeffs)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  alignPoly(coeffs)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
          }
          else {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "tipLabel")
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1 at testthat/test-coeff-building.R#50: alignPoly(coeffs)
  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-coeff-building.R#46: test_that("test different size trees to complex polynomials", 
      {
          differentSizeTrees <- c(rtree(2), rmtree(10, 10))
          coeffs <- treeToPoly(differentSizeTrees, type = "complex", 
              numThreads = 0)
          coeffs <- alignPoly(coeffs)
          firstDims <- dim(coeffs[[1]])
          res <- lapply(coeffs, function(i) dim(i) == firstDims)
          expect_condition(all(res))
      })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices) 
  {
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                  }
                  else {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "tipLabel")
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      return(coefficientMatrices)
  }
  <bytecode: 0x3c4ee90>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function alignPoly in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 2. Error: test different size trees to complex polynomials (@test-coeff-build
  the condition has length > 1
  Backtrace:
   1. treenomial::alignPoly(coeffs)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  alignPoly(coeffs)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
          }
          else {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "tipLabel")
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1 at testthat/test-coeff-building.R#68: alignPoly(coeffs)
  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-coeff-building.R#59: test_that("test different size trees with binary trait labels", 
      {
          largerTree <- rtree(30)
          largerTree$tip.label <- sample(c("t1", "t2"), size = 30, 
              replace = TRUE)
          smallerTree <- rtree(2)
          coeffs <- treeToPoly(c(largerTree, smallerTree), type = "tipLabel", 
              numThreads = 0)
          coeffs <- alignPoly(coeffs)
          firstDims <- dim(coeffs[[1]])
          res <- lapply(coeffs, function(i) dim(i) == firstDims)
          expect_condition(all(res))
          largerTrees <- rmtree(10, 10)
          largerTrees <- lapply(largerTrees, function(i) {
              i$tip.label <- sample(c("t1", "t2"), size = 10, replace = TRUE)
              return(i)
          })
          differentSizeTrees <- c(largerTrees, list(rtree(2)))
          coeffs <- treeToPoly(differentSizeTrees, type = "tipLabel", 
              numThreads = 0)
          coeffs <- alignPoly(coeffs)
          firstDims <- dim(coeffs[[1]])
          res <- lapply(coeffs, function(i) dim(i) == firstDims)
          expect_condition(all(res))
          largerTrees <- rmtree(10, 10)
          largerTrees <- lapply(largerTrees, function(i) {
              i$tip.label <- sample(c("t1", "t2"), size = 10, replace = TRUE)
              return(i)
          })
          smallerTrees <- rmtree(50, 5)
          smallerTrees <- lapply(smallerTrees, function(i) {
              i$tip.label <- sample(c("t1", "t2"), size = 5, replace = TRUE)
              return(i)
          })
          differentSizeTrees <- c(largerTrees, smallerTrees)
          coeffs <- treeToPoly(differentSizeTrees, type = "tipLabel", 
              numThreads = 0)
          coeffs <- alignPoly(coeffs)
          firstDims <- dim(coeffs[[1]])
          res <- lapply(coeffs, function(i) dim(i) == firstDims)
          expect_condition(all(res))
      })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices) 
  {
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                  }
                  else {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "tipLabel")
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      return(coefficientMatrices)
  }
  <bytecode: 0x3c4ee90>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function alignPoly in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 3. Error: test different size trees with binary trait labels (@test-coeff-bui
  the condition has length > 1
  Backtrace:
   1. treenomial::alignPoly(coeffs)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  polyToDistMat(coeffs, method = "logDiff", numThreads = 0)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
          distMat <- coeffDistMat(coefficientMatrices, method = method, 
              nThreads = numThreads)
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for the complex polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
              distMat <- coeffDistMat(coefficientMatrices, method = "logDiffComplex", 
                  nThreads = numThreads)
          }
          else {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for binary trait label polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "binTipLabel")
              distMat <- coeffDistMat(coefficientMatrices, method = "tipLab", 
                  nThreads = numThreads)
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1 at testthat/test-coeff-distances.R#12: polyToDistMat(coeffs, method = "logDiff", numThreads = 0)
  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-coeff-distances.R#7: test_that("test that different distance method have correct result (small manual check)", 
      {
          coeffs <- allTrees(6)[[6]]
          dLogDiff <- polyToDistMat(coeffs, method = "logDiff", 
              numThreads = 0)
          dWLogDiff <- polyToDistMat(coeffs, method = "wLogDiff", 
              numThreads = 0)
          testWlogL1 <- function(coeffA, coeffB) {
              logDiffMat <- rowSums(log(1 + abs(coeffA - coeffB)))
              weightVect <- c(1, (1:(nrow(coeffA) - 1)))^(-2)
              sum(logDiffMat * weightVect)
          }
          expect_equal(dWLogDiff[2, 4], testWlogL1(coeffs[[2]], 
              coeffs[[4]]))
      })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices, method = "logDiff", numThreads = -1) 
  {
      if (!(method %in% c("pa", "ap", "logDiff", "wLogDiff"))) {
          stop("invalid method")
      }
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
                  distMat <- coeffDistMat(coefficientMatrices, 
                    method = method, nThreads = numThreads)
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for the complex polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "logDiffComplex", nThreads = numThreads)
                  }
                  else {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for binary trait label polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "binTipLabel")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "tipLab", nThreads = numThreads)
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      rownames(distMat) <- names(coefficientMatrices)
      colnames(distMat) <- names(coefficientMatrices)
      return(distMat)
  }
  <bytecode: 0x3c3a558>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function polyToDistMat in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 4. Error: test that different distance method have correct result (small manu
  the condition has length > 1
  Backtrace:
   1. treenomial::polyToDistMat(coeffs, method = "logDiff", numThreads = 0)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  polyToDistMat(treeToPoly(trees, type = type, numThreads = numThreads), 
      method = method, numThreads = numThreads)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
          distMat <- coeffDistMat(coefficientMatrices, method = method, 
              nThreads = numThreads)
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for the complex polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
              distMat <- coeffDistMat(coefficientMatrices, method = "logDiffComplex", 
                  nThreads = numThreads)
          }
          else {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for binary trait label polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "binTipLabel")
              distMat <- coeffDistMat(coefficientMatrices, method = "tipLab", 
                  nThreads = numThreads)
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1: polyToDistMat(treeToPoly(trees, type = type, numThreads = numThreads), 
      method = method, numThreads = numThreads)
  where 2 at testthat/test-coeff-distances.R#35: treeToDistMat(identicalForest, method = "logDiff", type = "complex", 
      numThreads = 0)
  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-coeff-distances.R#31: test_that("test distance matrix of same trees is zero for each method", 
      {
          tree <- list(rtree(10))
          identicalForest <- rep(tree, 10)
          distanceMatrix <- treeToDistMat(identicalForest, method = "logDiff", 
              type = "complex", numThreads = 0)
          expect_true(all(distanceMatrix == 0))
          distanceMatrix <- treeToDistMat(identicalForest, method = "logDiff", 
              numThreads = 0)
          expect_true(all(distanceMatrix == 0))
          distanceMatrix <- treeToDistMat(identicalForest, method = "wLogDiff", 
              numThreads = 0)
          expect_true(all(distanceMatrix == 0))
          distanceMatrix <- treeToDistMat(identicalForest, method = "pa", 
              numThreads = 0)
          expect_true(all(distanceMatrix == 0))
          distanceMatrix <- treeToDistMat(identicalForest, method = "ap", 
              numThreads = 0)
          expect_true(all(distanceMatrix == 0))
      })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices, method = "logDiff", numThreads = -1) 
  {
      if (!(method %in% c("pa", "ap", "logDiff", "wLogDiff"))) {
          stop("invalid method")
      }
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
                  distMat <- coeffDistMat(coefficientMatrices, 
                    method = method, nThreads = numThreads)
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for the complex polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "logDiffComplex", nThreads = numThreads)
                  }
                  else {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for binary trait label polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "binTipLabel")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "tipLab", nThreads = numThreads)
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      rownames(distMat) <- names(coefficientMatrices)
      colnames(distMat) <- names(coefficientMatrices)
      return(distMat)
  }
  <bytecode: 0x3c3a558>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function polyToDistMat in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 5. Error: test distance matrix of same trees is zero for each method (@test-c
  the condition has length > 1
  Backtrace:
   1. treenomial::treeToDistMat(...)
   2. treenomial::polyToDistMat(...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  polyToDistMat(treeToPoly(trees, type = type, numThreads = numThreads), 
      method = method, numThreads = numThreads)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
          distMat <- coeffDistMat(coefficientMatrices, method = method, 
              nThreads = numThreads)
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for the complex polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
              distMat <- coeffDistMat(coefficientMatrices, method = "logDiffComplex", 
                  nThreads = numThreads)
          }
          else {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for binary trait label polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "binTipLabel")
              distMat <- coeffDistMat(coefficientMatrices, method = "tipLab", 
                  nThreads = numThreads)
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1: polyToDistMat(treeToPoly(trees, type = type, numThreads = numThreads), 
      method = method, numThreads = numThreads)
  where 2 at testthat/test-coeff-distances.R#56: treeToDistMat(trees, numThreads = 0)
  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-coeff-distances.R#53: test_that("testing naming carry through", {
      trees <- c(rmtree(2, 10), rmtree(2, 131), rtree(2), rtree(3))
      names(trees) <- c(rep(c("smaller", "larger"), each = 2), 
          "twoTip", "threeTip")
      d <- treeToDistMat(trees, numThreads = 0)
      expect_equal(rownames(d), names(trees))
      expect_equal(colnames(d), names(trees))
  })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices, method = "logDiff", numThreads = -1) 
  {
      if (!(method %in% c("pa", "ap", "logDiff", "wLogDiff"))) {
          stop("invalid method")
      }
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
                  distMat <- coeffDistMat(coefficientMatrices, 
                    method = method, nThreads = numThreads)
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for the complex polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "logDiffComplex", nThreads = numThreads)
                  }
                  else {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for binary trait label polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "binTipLabel")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "tipLab", nThreads = numThreads)
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      rownames(distMat) <- names(coefficientMatrices)
      colnames(distMat) <- names(coefficientMatrices)
      return(distMat)
  }
  <bytecode: 0x3c3a558>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function polyToDistMat in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 6. Error: testing naming carry through (@test-coeff-distances.R#56)  --------
  the condition has length > 1
  Backtrace:
   1. treenomial::treeToDistMat(trees, numThreads = 0)
   2. treenomial::polyToDistMat(...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  polyToDistMat(treeToPoly(trees, type = type, numThreads = numThreads), 
      method = method, numThreads = numThreads)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
          distMat <- coeffDistMat(coefficientMatrices, method = method, 
              nThreads = numThreads)
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for the complex polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
              distMat <- coeffDistMat(coefficientMatrices, method = "logDiffComplex", 
                  nThreads = numThreads)
          }
          else {
              if (method != "logDiff") 
                  warning("only the logDiff method is available for binary trait label polynomial")
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "binTipLabel")
              distMat <- coeffDistMat(coefficientMatrices, method = "tipLab", 
                  nThreads = numThreads)
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1: polyToDistMat(treeToPoly(trees, type = type, numThreads = numThreads), 
      method = method, numThreads = numThreads)
  where 2 at testthat/test-coeff-distances.R#64: treeToDistMat(rmtree(100, 20), numThreads = 0)
  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-coeff-distances.R#62: test_that("ensure distance matrix is symmetric", {
      distanceMatrix <- treeToDistMat(rmtree(100, 20), numThreads = 0)
      expect_true(all(distanceMatrix == t(distanceMatrix)))
  })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices, method = "logDiff", numThreads = -1) 
  {
      if (!(method %in% c("pa", "ap", "logDiff", "wLogDiff"))) {
          stop("invalid method")
      }
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
                  distMat <- coeffDistMat(coefficientMatrices, 
                    method = method, nThreads = numThreads)
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for the complex polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "logDiffComplex", nThreads = numThreads)
                  }
                  else {
                    if (method != "logDiff") 
                      warning("only the logDiff method is available for binary trait label polynomial")
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "binTipLabel")
                    distMat <- coeffDistMat(coefficientMatrices, 
                      method = "tipLab", nThreads = numThreads)
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      rownames(distMat) <- names(coefficientMatrices)
      colnames(distMat) <- names(coefficientMatrices)
      return(distMat)
  }
  <bytecode: 0x3c3a558>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function polyToDistMat in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 7. Error: ensure distance matrix is symmetric (@test-coeff-distances.R#64)  -
  the condition has length > 1
  Backtrace:
   1. treenomial::treeToDistMat(rmtree(100, 20), numThreads = 0)
   2. treenomial::polyToDistMat(...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  alignPoly(coeffs)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
          }
          else {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "tipLabel")
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1: alignPoly(coeffs)
  where 2: treeDist(target, trees, type = type, method = method, numThreads = numThreads)
  where 3 at testthat/test-coeff-distances.R#76: plotExtremeTrees(threeTip, c(forestSixty, threeTip, forestTen), 
      2, numThreads = 0)
  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-coeff-distances.R#71: test_that("ensure correct min/max trees are being found", {
      forestTen <- rmtree(100, 10)
      forestSixty <- rmtree(42, 60)
      threeTip <- rtree(3)
      minTrees <- plotExtremeTrees(threeTip, c(forestSixty, threeTip, 
          forestTen), 2, numThreads = 0)
      expect_equal(minTrees[[1]]$distance, 0)
      expect_equal(treeDist(minTrees[[1]]$tree, threeTip, numThreads = 0), 
          0)
      maxTrees <- plotExtremeTrees(threeTip, c(forestSixty, threeTip, 
          forestTen), 2, comparison = "max", numThreads = 0)
      expect_equal(maxTrees[[1]]$distance, treeDist(threeTip, maxTrees[[1]]$tree, 
          numThreads = 0))
  })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices) 
  {
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                  }
                  else {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "tipLabel")
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      return(coefficientMatrices)
  }
  <bytecode: 0x3c4ee90>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function alignPoly in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 8. Error: ensure correct min/max trees are being found (@test-coeff-distances
  the condition has length > 1
  Backtrace:
   1. treenomial::plotExtremeTrees(...)
   2. treenomial::treeDist(...)
   3. treenomial::alignPoly(coeffs)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  treenomial
   --- call from context --- 
  alignPoly(coeffs)
   --- call from argument --- 
  if (class(coefficientMatrices[[1]]) == "matrix") {
      if (typeof(coefficientMatrices[[1]]) == "double") {
          coefficientMatrices <- alignCoeffs(coefficientMatrices, 
              type = "real")
      }
      else if (typeof(coefficientMatrices[[1]]) == "complex") {
          if (dim(coefficientMatrices[[1]])[[1]] == 1) {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "complex")
          }
          else {
              coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                  type = "tipLabel")
          }
      }
      else {
          stop("invalid input")
      }
  } else {
      stop("input must be a list of coefficient matrices")
  }
   --- R stacktrace ---
  where 1: alignPoly(coeffs)
  where 2: treeDist(threeTip, threeTip, numThreads = 0)
  where 3: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 4: withVisible(code)
  where 5: withCallingHandlers(withVisible(code), warning = handle_warning, 
      message = handle_message)
  where 6: force(code)
  where 7: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), 
      warning = handle_warning, message = handle_message))
  where 8: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 9: quasi_capture(enquo(object), NULL, evaluate_promise)
  where 10 at testthat/test-coeff-distances.R#93: expect_silent(treeDist(threeTip, threeTip, numThreads = 0))
  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-coeff-distances.R#88: test_that("tests with single and lists arguments", {
      forestTen <- rmtree(100, 10)
      forestSixty <- rmtree(42, 60)
      threeTip <- rtree(3)
      expect_silent(treeDist(threeTip, threeTip, numThreads = 0))
      expect_silent(treeDist(threeTip, forestSixty, numThreads = 0))
      expect_error(treeDist(list(threeTip), forestSixty, numThreads = 0))
      expect_error(treeDist(list(threeTip), list(forestSixty), 
          numThreads = 0))
      coeffsSixty <- treeToPoly(forestSixty, numThreads = 0)
      coeffsThree <- treeToPoly(threeTip, numThreads = 0)
      expect_silent(polyDist(coeffsThree, coeffsThree, numThreads = 0))
      expect_silent(polyDist(coeffsThree, coeffsSixty, numThreads = 0))
      expect_error(polyDist(list(coeffsThree), coeffsSixty, numThreads = 0))
      expect_error(polyDist(list(coeffsThree), list(coeffsSixty), 
          numThreads = 0))
      expect_silent(plotExtremeTrees(threeTip, threeTip, 1, numThreads = 0))
      expect_silent(plotExtremeTrees(threeTip, forestSixty, 1, 
          numThreads = 0))
      expect_error(plotExtremeTrees(list(threeTip), forestSixty, 
          1, numThreads = 0))
      expect_error(plotExtremeTrees(list(threeTip), list(forestSixty), 
          1, numThreads = 0))
  })
  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("treenomial")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (coefficientMatrices) 
  {
      if (class(coefficientMatrices) == "list") {
          if (class(coefficientMatrices[[1]]) == "matrix") {
              if (typeof(coefficientMatrices[[1]]) == "double") {
                  coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                    type = "real")
              }
              else if (typeof(coefficientMatrices[[1]]) == "complex") {
                  if (dim(coefficientMatrices[[1]])[[1]] == 1) {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "complex")
                  }
                  else {
                    coefficientMatrices <- alignCoeffs(coefficientMatrices, 
                      type = "tipLabel")
                  }
              }
              else {
                  stop("invalid input")
              }
          }
          else {
              stop("input must be a list of coefficient matrices")
          }
      }
      else {
          stop("input must be a list of coefficient matrices")
      }
      return(coefficientMatrices)
  }
  <bytecode: 0x3c4ee90>
  <environment: namespace:treenomial>
   --- function search by body ---
  Function alignPoly in namespace treenomial has this body.
   ----------- END OF FAILURE REPORT -------------- 
  -- 9. Error: tests with single and lists arguments (@test-coeff-distances.R#93) 
  the condition has length > 1
  Backtrace:
    1. testthat::expect_silent(treeDist(threeTip, threeTip, numThreads = 0))
    9. treenomial::treeDist(threeTip, threeTip, numThreads = 0)
   10. treenomial::alignPoly(coeffs)
  
  == testthat results  ===========================================================
  [ OK: 8 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 9 ]
  1. Error: test different size trees to real polynomials (@test-coeff-building.R#38) 
  2. Error: test different size trees to complex polynomials (@test-coeff-building.R#50) 
  3. Error: test different size trees with binary trait labels (@test-coeff-building.R#68) 
  4. Error: test that different distance method have correct result (small manual check) (@test-coeff-distances.R#12) 
  5. Error: test distance matrix of same trees is zero for each method (@test-coeff-distances.R#35) 
  6. Error: testing naming carry through (@test-coeff-distances.R#56) 
  7. Error: ensure distance matrix is symmetric (@test-coeff-distances.R#64) 
  8. Error: ensure correct min/max trees are being found (@test-coeff-distances.R#76) 
  9. Error: tests with single and lists arguments (@test-coeff-distances.R#93) 
  
  Error: testthat unit tests failed
  Execution halted