Running ‘testthat.R’ [7s/8s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(hopit)
  Loading required package: survey
  Loading required package: grid
  Loading required package: Matrix
  Loading required package: survival
  
  Attaching package: 'survey'
  
  The following object is masked from 'package:graphics':
  
      dotchart
  
  > 
  > test_check("hopit")
  Calculating the starting parameters... done
  Fitting the model... done
  Calculating the maximum latent range... done
  Calculating the Hessian matrix... ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  hopit
   --- call from context --- 
  check_vcov(model$vcov.basic)
   --- call from argument --- 
  if (class(vcov) == "try-error") {
      warning(call. = FALSE, hopit_msg(32))
      vcov <- NA
  }
   --- R stacktrace ---
  where 1: check_vcov(model$vcov.basic)
  where 2: hopit(latent.formula = latent.formula.I, thresh.formula = thresh.formula.O, 
      data = newhealthsurvey, decreasing.levels = TRUE)
  where 3: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 4: withCallingHandlers(code, message = function(condition) {
      out$push(condition)
      maybe_restart("muffleMessage")
  })
  where 5: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 6: quasi_capture(enquo(object), label, capture_messages)
  where 7 at testthat/test-hopit.R#163: expect_message(hopit(latent.formula = latent.formula.I, thresh.formula = thresh.formula.O, 
      data = newhealthsurvey, decreasing.levels = TRUE))
  where 8: eval(code, test_env)
  where 9: eval(code, test_env)
  where 10: 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 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 14: doTryCatch(return(expr), name, parentenv, handler)
  where 15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 16: tryCatchList(expr, classes, parentenv, handlers)
  where 17: 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 18: test_code(NULL, exprs, env)
  where 19: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 20: force(code)
  where 21: doWithOneRestart(return(expr), restart)
  where 22: withOneRestart(expr, restarts[[1L]])
  where 23: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 24: 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 25: FUN(X[[i]], ...)
  where 26: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, 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 = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 32: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 33: 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 34: 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 35: test_check("hopit")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (vcov) 
  {
      if (class(vcov) == "try-error") {
          warning(call. = FALSE, hopit_msg(32))
          vcov <- NA
      }
      vcov
  }
  <bytecode: 0x55df7ac07cb8>
  <environment: namespace:hopit>
   --- function search by body ---
  Function check_vcov in namespace hopit has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1