Running ‘testthat.R’ [122s/100s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mdgc)
  > 
  > test_check("mdgc")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● On CRAN (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-get-log-lm-terms.R:78:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  `val` not equal to -45.8852616647973.
  1/1 mismatches
  [1] -92.4 - -45.9 == -46.5
  ── Failure (test-get-log-lm-terms.R:82:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  `val` not equal to -45.8852616647973.
  1/1 mismatches
  [1] -Inf - -45.9 == -Inf
  ── Error (test-get-log-lm-terms.R:84:3): 'get_log_lm_terms' gives the correct result with and without gradients ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc:::log_ml(pa, comp_derivs = TRUE) test-get-log-lm-terms.R:84:2
   2.   └─mdgc:::eval_log_lm_terms(...) test-get-log-lm-terms.R:66:4
  ── Failure (test-get-log-lm-terms.R:189:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  `val` not equal to -62.496433767902.
  1/1 mismatches
  [1] -125 - -62.5 == -62.2
  ── Failure (test-get-log-lm-terms.R:221:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -2).
  15/15 mismatches (average diff: 6.05)
  [1] -17.69 - -10.849 == -6.84
  [2]  26.12 -  11.341 == 14.78
  [3]  -3.86 -  -8.097 ==  4.24
  [4]  -1.05 -   0.314 == -1.36
  [5]   4.90 -   7.783 == -2.88
  [6] -23.06 - -14.980 == -8.08
  [7]   3.64 - -10.402 == 14.04
  [8]  -5.90 -   1.321 == -7.22
  [9]   2.26 -   9.081 == -6.82
  ...
  ── Failure (test-get-log-lm-terms.R:224:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 2).
  2/2 mismatches (average diff: 1.5)
  [1] -2.730 - -0.263 == -2.468
  [2] -0.526 - -1.055 ==  0.528
  ── Failure (test-get-log-lm-terms.R:230:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(c(attr(grad, "grad_vcov")) %*% jac) not equal to head(true_grad, -2).
  15/15 mismatches (average diff: 6.11)
  [1] -17.50 - -10.849 ==  -6.650
  [2]  26.30 -  11.341 ==  14.958
  [3]  -5.32 -  -8.097 ==   2.781
  [4]   0.95 -   0.314 ==   0.636
  [5]   4.37 -   7.783 ==  -3.417
  [6] -26.75 - -14.980 == -11.770
  [7]  -8.08 - -10.402 ==   2.325
  [8]  -0.53 -   1.321 ==  -1.851
  [9]   8.61 -   9.081 ==  -0.475
  ...
  ── Failure (test-get-log-lm-terms.R:233:3): 'get_log_lm_terms' gives the correct result with and without gradients with multinomial variables ──
  drop(attr(grad, "grad_mea")) not equal to tail(true_grad, 2).
  2/2 mismatches (average diff: 0.898)
  [1] -1.36 - -0.263 == -1.102
  [2] -1.75 - -1.055 == -0.694
  ── Failure (test-get-log-lm-terms.R:323:3): 'get_log_lm_terms' gives the correct result with and without gradients (ordinal and binary data) ──
  `val` not equal to -50.633131628025.
  1/1 mismatches
  [1] -101 - -50.6 == -50.5
  ── Error (test-get-log-lm-terms.R:325:3): 'get_log_lm_terms' gives the correct result with and without gradients (ordinal and binary data) ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc:::log_ml(par, n_threads = 2) test-get-log-lm-terms.R:325:2
   2.   └─mdgc:::eval_log_lm_terms(...) test-get-log-lm-terms.R:313:4
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20.2 - -10 == -10.1
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -9.98
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -20 - -10 == -10
  ── Failure (test-get-log-lm-terms.R:524:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  `res` not equal to f1 + f2.
  1/1 mismatches
  [1] -22.4 - -10 == -12.4
  ── Error (test-get-log-lm-terms.R:522:5): mdgc_log_ml gives the correct result with a single log marginal likelihood term ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_log_ml(...) test-get-log-lm-terms.R:522:4
   2.   └─mdgc:::.mdgc_log_ml(...)
   3.     └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-man-files.R:15:3): mdgc examples gives the same ─────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
       █
    1. └─mdgc::mdgc(...) test-man-files.R:15:2
    2.   └─mdgc::mdgc_fit(...)
    3.     └─mdgc:::svrg(...)
    4.       └─base::sapply(...)
    5.         └─base::lapply(X = X, FUN = FUN, ...)
    6.           └─mdgc:::FUN(X[[i]], ...)
    7.             └─mdgc:::par_fn_wrap(...)
    8.               └─mdgc:::par_fn(...)
    9.                 └─mdgc:::.mdgc_log_ml(...)
   10.                   └─mdgc:::eval_log_lm_terms(...)
  ── Failure (test-man-files.R:49:3): iris examples give the same ────────────────
  mdgc_log_ml(ptr, start_vals, obj$means) not equal to `truth`.
  1/1 mismatches
  [1] -1245 - -622 == -623
  ── Failure (test-man-files.R:51:3): iris examples give the same ────────────────
  mdgc_log_ml(ptr, start_vals, obj$means, use_aprx = TRUE) not equal to `truth`.
  1/1 mismatches
  [1] -Inf - -622 == -Inf
  ── Error (test-man-files.R:56:3): iris examples give the same ──────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_log_ml(...) test-man-files.R:56:2
   2.   └─mdgc:::.mdgc_log_ml(...)
   3.     └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-mdgc-fit.R:58:3): ADAM gives the same ───────────────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_fit(...) test-mdgc-fit.R:58:2
   2.   └─mdgc:::adam(...)
   3.     └─mdgc:::par_fn_wrap(...)
   4.       └─mdgc:::par_fn(...)
   5.         └─mdgc:::.mdgc_log_ml(...)
   6.           └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-mdgc-fit.R:79:3): svrg gives the same ───────────────────────────
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_fit(...) test-mdgc-fit.R:79:2
   2.   └─mdgc:::svrg(...)
   3.     └─base::sapply(...)
   4.       └─base::lapply(X = X, FUN = FUN, ...)
   5.         └─mdgc:::FUN(X[[i]], ...)
   6.           └─mdgc:::par_fn_wrap(...)
   7.             └─mdgc:::par_fn(...)
   8.               └─mdgc:::.mdgc_log_ml(...)
   9.                 └─mdgc:::eval_log_lm_terms(...)
  ── Error (test-mdgc-impute.R:45:3): mdgc_impute gives the same as before and with and without reordering ──
  Error: Some exception occured. Further details cannot be provided because of https://stackoverflow.com/q/66362932/5861244.
  Backtrace:
      █
   1. └─mdgc::mdgc_impute(...) test-mdgc-impute.R:45:2
   2.   └─mdgc:::impute(...)
  
  [ FAIL 25 | WARN 0 | SKIP 1 | PASS 7 ]
  Error: Test failures
  Execution halted