Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(latrend)
  > 
  > test_check('latrend')
  Loading required namespace: ggplot2
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (7)
  • dtwclust cannot be loaded (1)
  • empty test (1)
  • lme4 cannot be loaded (1)
  • mixAK cannot be loaded (1)
  • skipping MixTVEM tests because the TVEMMixNormal() function is not loaded (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-cluslong.R:183:3): data with missing observations ───────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─latrend::latrend(lcMethodTestGCKM(), data = naData) test-cluslong.R:183:2
    2. │ └─latrend:::as.lcMethod(method)
    3. │   ├─assertthat::assert_that(is.lcMethod(x) || is.character(x))
    4. │   │ └─assertthat::see_if(..., env = env, msg = msg)
    5. │   │   ├─base::tryCatch(...)
    6. │   │   │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
    7. │   │   │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    8. │   │   │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
    9. │   │   └─base::eval(assertion, env)
   10. │   │     └─base::eval(assertion, env)
   11. │   └─latrend::is.lcMethod(x)
   12. └─latrend:::lcMethodTestGCKM()
   13.   └─latrend::lcMethodGCKM(formula = Value ~ (1 | Traj), ...) C:\r_packages\pkgcheck\CRAN\latrend\latrend.Rcheck\tests\testthat\setup-method-functions.R:25:2
   14.     ├─base::do.call(new, as.list(mc))
   15.     └─(function (Class, ...) ...
   16.       ├─methods::initialize(value, ...)
   17.       └─latrend:::initialize(value, ...)
   18.         ├─latrend::getArgumentDefaults(.Object)
   19.         └─latrend::getArgumentDefaults(.Object)
   20.           └─latrend:::.local(object, ...)
   21.             └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-flexmix.R:19:3): default ────────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─latrend::latrend(lcMethodTestFlexmix(), data = testLongData) test-flexmix.R:19:2
    2. │ └─latrend:::.fitLatrendMethod(...)
    3. │   ├─latrend:::suppressFun(...)
    4. │   │ ├─utils::capture.output(suppressMessages(...))
    5. │   │ │ └─base::withVisible(...elt(i))
    6. │   │ └─base::suppressMessages(...)
    7. │   │   └─base::withCallingHandlers(...)
    8. │   ├─latrend::preFit(...)
    9. │   └─latrend::preFit(...)
   10. │     └─formula(method) %>% dropRE()
   11. └─latrend:::dropRE(.)
   12.   ├─getREterms(f) %>% as.character
   13.   └─latrend:::getREterms(f)
   14.     └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-flexmix.R:24:3): one cluster ────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─latrend::latrend(...) test-flexmix.R:24:2
    2. │ └─latrend:::.fitLatrendMethod(...)
    3. │   ├─latrend:::suppressFun(...)
    4. │   │ ├─utils::capture.output(suppressMessages(...))
    5. │   │ │ └─base::withVisible(...elt(i))
    6. │   │ └─base::suppressMessages(...)
    7. │   │   └─base::withCallingHandlers(...)
    8. │   ├─latrend::preFit(...)
    9. │   └─latrend::preFit(...)
   10. │     └─formula(method) %>% dropRE()
   11. └─latrend:::dropRE(.)
   12.   ├─getREterms(f) %>% as.character
   13.   └─latrend:::getREterms(f)
   14.     └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-flexmix.R:29:3): empty cluster ──────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─base::suppressWarnings(...) test-flexmix.R:29:2
    2. │ └─base::withCallingHandlers(...)
    3. ├─latrend::latrend(...) test-flexmix.R:30:4
    4. │ └─latrend:::.fitLatrendMethod(...)
    5. │   ├─latrend:::suppressFun(...)
    6. │   │ ├─utils::capture.output(suppressMessages(...))
    7. │   │ │ └─base::withVisible(...elt(i))
    8. │   │ └─base::suppressMessages(...)
    9. │   │   └─base::withCallingHandlers(...)
   10. │   ├─latrend::preFit(...)
   11. │   └─latrend::preFit(...)
   12. │     └─formula(method) %>% dropRE()
   13. └─latrend:::dropRE(.)
   14.   ├─getREterms(f) %>% as.character
   15.   └─latrend:::getREterms(f)
   16.     └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-flexmix.R:37:3): model spec ─────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─latrend::latrend(...) test-flexmix.R:37:2
    2. │ └─latrend:::.fitLatrendMethod(...)
    3. │   ├─latrend:::suppressFun(...)
    4. │   │ ├─utils::capture.output(suppressMessages(...))
    5. │   │ │ └─base::withVisible(...elt(i))
    6. │   │ └─base::suppressMessages(...)
    7. │   │   └─base::withCallingHandlers(...)
    8. │   ├─latrend::preFit(...)
    9. │   └─latrend::preFit(...)
   10. │     └─formula(method) %>% dropRE()
   11. └─latrend:::dropRE(.)
   12.   ├─getREterms(f) %>% as.character
   13.   └─latrend:::getREterms(f)
   14.     └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-flexmix.R:42:3): gbtm ───────────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─latrend::latrend(lcMethodTestFlexmixGBTM(), data = testLongData) test-flexmix.R:42:2
    2. │ └─latrend:::.fitLatrendMethod(...)
    3. │   ├─latrend:::suppressFun(...)
    4. │   │ ├─utils::capture.output(suppressMessages(...))
    5. │   │ │ └─base::withVisible(...elt(i))
    6. │   │ └─base::suppressMessages(...)
    7. │   │   └─base::withCallingHandlers(...)
    8. │   ├─latrend::preFit(...)
    9. │   └─latrend::preFit(...)
   10. │     └─latrend:::.local(method, data, envir, verbose, ...)
   11. │       ├─methods::callNextMethod()
   12. │       └─latrend:::.nextMethod(...)
   13. │         └─formula(method) %>% dropRE()
   14. └─latrend:::dropRE(.)
   15.   ├─getREterms(f) %>% as.character
   16.   └─latrend:::getREterms(f)
   17.     └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-formula.R:41:3): getREterms ─────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
      █
   1. ├─testthat::expect_null(getREterms(~0)) test-formula.R:41:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─latrend:::getREterms(~0)
   5.   └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-formula.R:51:3): hasRE ──────────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
      █
   1. ├─testthat::expect_false(hasRE(A ~ 0)) test-formula.R:51:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─latrend:::hasRE(A ~ 0)
   5.   └─latrend:::getREterms(f)
   6.     └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-formula.R:59:3): REtermAsFormula ────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─testthat::expect_equal(...) test-formula.R:59:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─getREterms(A ~ B + (1 | C))[[1]] %>% REtermAsFormula
    5. ├─latrend:::REtermAsFormula(.)
    6. │ └─assertthat::assert_that(is.call(term))
    7. │   └─assertthat::see_if(..., env = env, msg = msg)
    8. │     ├─base::tryCatch(...)
    9. │     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   10. │     │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   12. │     └─base::eval(assertion, env)
   13. │       └─base::eval(assertion, env)
   14. └─latrend:::getREterms(A ~ B + (1 | C))
   15.   └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-formula.R:65:3): getREGroupName ─────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
       █
    1. ├─testthat::expect_equal(...) test-formula.R:65:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─getREterms(A ~ B + (1 | C))[[1]] %>% getREGroupName
    5. ├─latrend:::getREGroupName(.)
    6. │ └─assertthat::assert_that(is.call(term))
    7. │   └─assertthat::see_if(..., env = env, msg = msg)
    8. │     ├─base::tryCatch(...)
    9. │     │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
   10. │     │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
   12. │     └─base::eval(assertion, env)
   13. │       └─base::eval(assertion, env)
   14. └─latrend:::getREterms(A ~ B + (1 | C))
   15.   └─latrend:::.loadOptionalPackage("lme4")
  ── Error (test-formula.R:123:3): dropRE ────────────────────────────────────────
  Error in `.loadOptionalPackage("lme4")`: unable to load required package "lme4". Install the package to use this method.
  Backtrace:
      █
   1. ├─testthat::expect_equal(dropRE(~0), ~0) test-formula.R:123:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─latrend:::dropRE(~0)
   5.   ├─getREterms(f) %>% as.character
   6.   └─latrend:::getREterms(f)
   7.     └─latrend:::.loadOptionalPackage("lme4")
  
  [ FAIL 11 | WARN 0 | SKIP 12 | PASS 3596 ]
  Error: Test failures
  Execution halted