Running ‘testthat.R’ [137s/158s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(latrend)
  > 
  > test_check('latrend')
  [ FAIL 3 | WARN 1 | SKIP 9 | PASS 2174 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (7)
  • empty test (1)
  • skipping MixTVEM tests because the TVEMMixNormal() function is not loaded (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-lcmm.R:35:3): gmm ───────────────────────────────────────────────
  Error in `test.latrend("lcMethodLcmmGMM", instantiator = make.gmm, tests = tests, 
      data = lcmmData)`: Unexpected error occurred while evaluating test context: "basic"
  Error message:
  "Please specify initial values with argument 'B'"
  Stack trace:
  16: sys.source(file, envir = env)
  15: eval(exprs[i], envir)
  14: eval(exprs[i], envir)
  13: latrend(m, data = testData)
  12: .fitLatrendMethod(cmethod, modelData, envir = modelEnv, mc = mc, 
          verbose = verbose)
  11: suppressFun({
          modelEnv = preFit(method = method, data = data, envir = envir, 
              verbose = verbose)
          model = fit(method = method, data = data, envir = modelEnv, 
              verbose = verbose)
       ...
  10: capture.output(suppressMessages(...))
  9: withVisible(...elt(i))
  8: suppressMessages(...)
  7: withCallingHandlers(expr, message = function(c) if (inherits(c, 
         classes)) tryInvokeRestart("muffleMessage"))
  6: fit(method = method, data = data, envir = modelEnv, verbose = verbose)
  5: fit(method = method, data = data, envir = modelEnv, verbose = verbose)
  4: gmm_fit(method, data, envir, verbose, ...)
  3: do.call(lcmm::hlme, args)
  2: (function (fixed, mixture, random, subject, classmb, ng = 1, 
         idiag = FALSE, nwg = FALSE, cor = NULL, data, B, convB = 1e-04, 
         convL = 1e-04, convG = 1e-04, prior, pprior = NULL, maxiter = 500, 
         subset = NULL, na.action = 1, posfix = NULL, verbose = TRUE, 
         returndata = FALSE, var.time = NULL, partialH = FALSE, nproc = 1, 
      ...
  1: stop("Please specify initial values with argument 'B'")
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-lcmm.R:35:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─latrend::test.latrend(...) at test-lcmm.R:36:4
  ── Error (test-lcmm.R:55:3): gmm with NA covariate ─────────────────────────────
  Error in `test.latrend("lcMethodLcmmGMM", instantiator = make.gmm, tests = tests, 
      data = lcmmData)`: Unexpected error occurred while evaluating test context: "basic"
  Error message:
  "Please specify initial values with argument 'B'"
  Stack trace:
  16: sys.source(file, envir = env)
  15: eval(exprs[i], envir)
  14: eval(exprs[i], envir)
  13: latrend(m, data = testData)
  12: .fitLatrendMethod(cmethod, modelData, envir = modelEnv, mc = mc, 
          verbose = verbose)
  11: suppressFun({
          modelEnv = preFit(method = method, data = data, envir = envir, 
              verbose = verbose)
          model = fit(method = method, data = data, envir = modelEnv, 
              verbose = verbose)
       ...
  10: capture.output(suppressMessages(...))
  9: withVisible(...elt(i))
  8: suppressMessages(...)
  7: withCallingHandlers(expr, message = function(c) if (inherits(c, 
         classes)) tryInvokeRestart("muffleMessage"))
  6: fit(method = method, data = data, envir = modelEnv, verbose = verbose)
  5: fit(method = method, data = data, envir = modelEnv, verbose = verbose)
  4: gmm_fit(method, data, envir, verbose, ...)
  3: do.call(lcmm::hlme, args)
  2: (function (fixed, mixture, random, subject, classmb, ng = 1, 
         idiag = FALSE, nwg = FALSE, cor = NULL, data, B, convB = 1e-04, 
         convL = 1e-04, convG = 1e-04, prior, pprior = NULL, maxiter = 500, 
         subset = NULL, na.action = 1, posfix = NULL, verbose = TRUE, 
         returndata = FALSE, var.time = NULL, partialH = FALSE, nproc = 1, 
      ...
  1: stop("Please specify initial values with argument 'B'")
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-lcmm.R:55:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─latrend::test.latrend(...) at test-lcmm.R:56:4
  ── Error (test-lcmm.R:73:3): gbtm ──────────────────────────────────────────────
  Error in `test.latrend("lcMethodLcmmGBTM", instantiator = make.gbtm, tests = tests, 
      data = lcmmData)`: Unexpected error occurred while evaluating test context: "basic"
  Error message:
  "Please specify initial values with argument 'B'"
  Stack trace:
  16: sys.source(file, envir = env)
  15: eval(exprs[i], envir)
  14: eval(exprs[i], envir)
  13: latrend(m, data = testData)
  12: .fitLatrendMethod(cmethod, modelData, envir = modelEnv, mc = mc, 
          verbose = verbose)
  11: suppressFun({
          modelEnv = preFit(method = method, data = data, envir = envir, 
              verbose = verbose)
          model = fit(method = method, data = data, envir = modelEnv, 
              verbose = verbose)
       ...
  10: capture.output(suppressMessages(...))
  9: withVisible(...elt(i))
  8: suppressMessages(...)
  7: withCallingHandlers(expr, message = function(c) if (inherits(c, 
         classes)) tryInvokeRestart("muffleMessage"))
  6: fit(method = method, data = data, envir = modelEnv, verbose = verbose)
  5: fit(method = method, data = data, envir = modelEnv, verbose = verbose)
  4: gmm_fit(method, data, envir, verbose, ...)
  3: do.call(lcmm::hlme, args)
  2: (function (fixed, mixture, random, subject, classmb, ng = 1, 
         idiag = FALSE, nwg = FALSE, cor = NULL, data, B, convB = 1e-04, 
         convL = 1e-04, convG = 1e-04, prior, pprior = NULL, maxiter = 500, 
         subset = NULL, na.action = 1, posfix = NULL, verbose = TRUE, 
         returndata = FALSE, var.time = NULL, partialH = FALSE, nproc = 1, 
      ...
  1: stop("Please specify initial values with argument 'B'")
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-lcmm.R:73:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─latrend::test.latrend(...) at test-lcmm.R:74:4
  
  [ FAIL 3 | WARN 1 | SKIP 9 | PASS 2174 ]
  Error: Test failures
  Execution halted