Running ‘test-all.R’ [54s/76s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("POUMM")
  Loading required package: POUMM
  Loading required package: Rcpp
    generate 10000 samples 
    generate 10000 samples 
    generate 10000 samples 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  POUMM
   --- call from context --- 
  FUN(X[[i]], ...)
   --- call from argument --- 
  if (class(int) == "try-error") {
      int <- matrix(as.double(NA), nrow = ncol(as.matrix(.)), ncol = 2)
      colnames(int) <- c("lower", "upper")
      int
  } else {
      int
  }
   --- R stacktrace ---
  where 1: FUN(X[[i]], ...)
  where 2: lapply(mcs, function(.) {
      int <- try(HPDinterval(.), silent = TRUE)
      if (class(int) == "try-error") {
          int <- matrix(as.double(NA), nrow = ncol(as.matrix(.)), 
              ncol = 2)
          colnames(int) <- c("lower", "upper")
          int
      }
      else {
          int
      }
  })
  where 3: analyseMCMCs(object$fitMCMC$chains, stat = stats[[i]], statName = names(stats)[i], 
      start = startMCMC, end = endMCMC, thinMCMC = thinMCMC, as.dt = TRUE)
  where 4: FUN(X[[i]], ...)
  where 5: lapply(seq_along(stats), function(i) {
      analyseMCMCs(object$fitMCMC$chains, stat = stats[[i]], statName = names(stats)[i], 
          start = startMCMC, end = endMCMC, thinMCMC = thinMCMC, 
          as.dt = TRUE)
  })
  where 6: summary.POUMM(fit1)
  where 7: summary(fit1)
  where 8: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 9: withCallingHandlers(code, warning = function(condition) {
      out$push(condition)
      maybe_restart("muffleWarning")
  })
  where 10: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 11: quasi_capture(enquo(object), label, capture_warnings)
  where 12 at testthat/test-fit.R#27: expect_warning(smmShort <- summary(fit1))
  where 13: eval(code, test_env)
  where 14: eval(code, test_env)
  where 15: 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 16: doTryCatch(return(expr), name, parentenv, handler)
  where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 18: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 19: doTryCatch(return(expr), name, parentenv, handler)
  where 20: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 21: tryCatchList(expr, classes, parentenv, handlers)
  where 22: 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 23: test_code(desc, code, env = parent.frame())
  where 24 at testthat/test-fit.R#21: test_that("fit passes without errors", {
      expect_is(fit1 <- POUMM(z = z[1:N], tree = tree, spec = specifyPOUMM(z[1:N], 
          tree, nSamplesMCMC = 10000), verbose = FALSE), "POUMM")
      expect_warning(smmShort <- summary(fit1))
      expect_is(smmShort, "summary.POUMM")
      expect_warning(smmLong <- summary(fit1, mode = "long"))
      expect_is(smmLong, "summary.POUMM")
      expect_warning(smmExpert <- summary(fit1, mode = "expert"))
      expect_is(smmExpert, "summary.POUMM")
      expect_warning(plList <- plot(fit1, interactive = FALSE, 
          doPlot = FALSE))
      expect_is(plList, "list")
  })
  where 25: eval(code, test_env)
  where 26: eval(code, test_env)
  where 27: 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 28: doTryCatch(return(expr), name, parentenv, handler)
  where 29: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 30: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 31: doTryCatch(return(expr), name, parentenv, handler)
  where 32: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 33: tryCatchList(expr, classes, parentenv, handlers)
  where 34: 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 35: test_code(NULL, exprs, env)
  where 36: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: 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 42: FUN(X[[i]], ...)
  where 43: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: 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 49: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 50: 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 51: 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 52: test_check("POUMM")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (.) 
  {
      int <- try(HPDinterval(.), silent = TRUE)
      if (class(int) == "try-error") {
          int <- matrix(as.double(NA), nrow = ncol(as.matrix(.)), 
              ncol = 2)
          colnames(int) <- c("lower", "upper")
          int
      }
      else {
          int
      }
  }
  <environment: 0x55f7318246e0>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1