Running ‘testthat.R’ [20s/50s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(GUILDS)
  > test_check("GUILDS")
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 100 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-maxLikelihood.Guilds.Conditional.R:13:3'): maxLikelihood.GuildsConditional: use ──
  Error in `if (fnew <= fmin) {
      if (xnew < xmin) {
          xu <- xmin
      }
      else {
          xl <- xmin
      }
      xmin2 <- xmin1
      fmin2 <- fmin1
      xmin1 <- xmin
      fmin1 <- fmin
      xmin <- xnew
      fmin <- fnew
  } else {
      if (xnew < xmin) {
          xl <- xnew
      }
      else {
          xu <- xnew
      }
      if (xnew <= xmin1 || xmin1 == xmin) {
          xmin2 = xmin1
          fmin2 = fmin1
          xmin1 = xnew
          fmin1 = fnew
      }
      else if (xnew <= xmin2 || xmin2 == xmin || xmin2 == xmin1) {
          xmin2 <- xnew
          fmin2 <- fnew
      }
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─GUILDS::maxLikelihood.Guilds.Conditional(...) at test-maxLikelihood.Guilds.Conditional.R:13:3
   2. │ └─nloptr::nloptr(...)
   3. └─nloptr (local) `<fn>`(`<dbl>`)
   4.   └─GUILDS (local) eval_f(x, ...)
   5.     └─GUILDS:::conditional.LogLik(...)
   6.       └─GUILDS:::logLikguilds(...)
   7.         └─pracma::fminbnd(f, 0, 1, maxiter = 500, tol = 1e-04)
  ── Error ('test-maxLikelihood.Guilds.R:14:3'): maxLikelihood.Guilds: use ───────
  Error in `if (fnew <= fmin) {
      if (xnew < xmin) {
          xu <- xmin
      }
      else {
          xl <- xmin
      }
      xmin2 <- xmin1
      fmin2 <- fmin1
      xmin1 <- xmin
      fmin1 <- fmin
      xmin <- xnew
      fmin <- fnew
  } else {
      if (xnew < xmin) {
          xl <- xnew
      }
      else {
          xu <- xnew
      }
      if (xnew <= xmin1 || xmin1 == xmin) {
          xmin2 = xmin1
          fmin2 = fmin1
          xmin1 = xnew
          fmin1 = fnew
      }
      else if (xnew <= xmin2 || xmin2 == xmin || xmin2 == xmin1) {
          xmin2 <- xnew
          fmin2 <- fnew
      }
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─GUILDS::maxLikelihood.Guilds(...) at test-maxLikelihood.Guilds.R:14:3
   2. │ └─nloptr::nloptr(...)
   3. └─nloptr (local) `<fn>`(`<dbl>`)
   4.   └─GUILDS (local) eval_f(x, ...)
   5.     └─GUILDS:::logLikguilds(...)
   6.       └─pracma::fminbnd(f, 0, 1, maxiter = 500, tol = 1e-04)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 100 ]
  Error: Test failures
  Execution halted