Running ‘testthat.R’ [41s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > #
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > library(testthat)
  > library(modelbased)
  > 
  > test_check("modelbased")
  Starting 2 test processes.
  Saving _problems/test-attributes_estimatefun-108.R
  Saving _problems/test-estimate_slopes-10.R
  Saving _problems/test-estimate_slopes-63.R
  Saving _problems/test-estimate_slopes-124.R
  > test-multivariate_response.R: Confidence intervals are not yet supported for models of class `mlm`.
  > test-multivariate_response.R: Confidence intervals are not yet supported for models of class `mlm`.
  Saving _problems/test-transform_response-65.R
  Saving _problems/test-visualisation_recipe-151.R
  [ FAIL 6 | WARN 0 | SKIP 54 | PASS 194 ]
  
  ══ Skipped tests (54) ══════════════════════════════════════════════════════════
  • .Platform$OS.type == "windows" is not TRUE (1):
    'test-estimate_predicted.R:58:3'
  • On CRAN (45): 'test-backtransform_invlink.R:1:1', 'test-betareg.R:1:1',
    'test-bias_correction.R:1:1', 'test-brms-marginaleffects.R:1:1',
    'test-brms.R:1:1', 'test-equivalence.R:1:1',
    'test-estimate_contrasts-average.R:1:1', 'test-estimate_contrasts.R:1:1',
    'test-estimate_contrasts_bookexamples.R:1:1',
    'test-estimate_contrasts_counterfactual.R:1:1',
    'test-estimate_contrasts_effectsize.R:1:1',
    'test-estimate_contrasts_inequality.R:1:1',
    'test-estimate_contrasts_methods.R:1:1', 'test-estimate_filter.R:1:1',
    'test-estimate_grouplevel.R:54:3', 'test-estimate_grouplevel.R:72:3',
    'test-estimate_grouplevel.R:93:3', 'test-estimate_grouplevel.R:123:3',
    'test-estimate_grouplevel.R:150:5', 'test-estimate_grouplevel.R:182:3',
    'test-estimate_grouplevel.R:261:3', 'test-estimate_grouplevel.R:308:3',
    'test-estimate_means-average.R:1:1', 'test-estimate_means.R:1:1',
    'test-estimate_means_ci.R:1:1', 'test-estimate_means_counterfactuals.R:1:1',
    'test-estimate_means_dotargs.R:1:1',
    'test-estimate_means_marginalization.R:1:1',
    'test-estimate_means_mixed.R:1:1', 'test-estimate_slopes.R:129:1',
    'test-g_computation.R:1:1', 'test-get_marginaltrends.R:1:1',
    'test-glmmTMB.R:1:1', 'test-joint_test.R:1:1', 'test-keep_iterations.R:1:1',
    'test-maihda.R:1:1', 'test-mice.R:1:1', 'test-ordinal.R:1:1',
    'test-plot-grouplevel.R:1:1', 'test-predict-dpar.R:1:1',
    'test-standardize.R:1:1', 'test-summary_estimate_slopes.R:3:1',
    'test-transform_response.R:3:1', 'test-vcov.R:1:1', 'test-zeroinfl.R:1:1'
  • On Linux (8): 'test-plot-facet.R:1:1', 'test-plot-flexible_numeric.R:1:1',
    'test-plot-ordinal.R:1:1', 'test-plot-slopes.R:1:1', 'test-plot.R:1:1',
    'test-print.R:1:1', 'test-residualize_over_grid.R:1:1',
    'test-scoping_issues.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-attributes_estimatefun.R:108:3'): attributes_means, slopes ─────
  Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 13/13 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─base::suppressMessages(...) at test-attributes_estimatefun.R:108:3
    2. │ └─base::withCallingHandlers(...)
    3. └─modelbased::estimate_slopes(model, "Sepal.Width", backend = "marginaleffects")
    4.   └─modelbased::get_marginaltrends(...)
    5.     ├─base::suppressWarnings(do.call(marginaleffects::avg_slopes, fun_args))
    6.     │ └─base::withCallingHandlers(...)
    7.     ├─base::do.call(marginaleffects::avg_slopes, fun_args)
    8.     ├─marginaleffects (local) `<fn>`(...)
    9.     │ └─base::eval.parent(call_attr)
   10.     │   └─base::eval(expr, p)
   11.     │     └─base::eval(expr, p)
   12.     ├─marginaleffects::slopes(...)
   13.     │ └─base::eval.parent(call_attr_c)
   14.     │   └─base::eval(expr, p)
   15.     │     └─base::eval(expr, p)
   16.     └─marginaleffects::comparisons(...)
   17.       ├─base::do.call("get_comparisons", args)
   18.       └─marginaleffects:::get_comparisons(...)
   19.         ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp]
   20.         └─data.table:::`[.data.table`(...)
  ── Error ('test-estimate_slopes.R:10:3'): estimate_slopes ──────────────────────
  Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 13/13 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─base::suppressMessages(estimate_slopes(model, backend = "marginaleffects")) at test-estimate_slopes.R:10:3
    2. │ └─base::withCallingHandlers(...)
    3. └─modelbased::estimate_slopes(model, backend = "marginaleffects")
    4.   └─modelbased::get_marginaltrends(...)
    5.     ├─base::suppressWarnings(do.call(marginaleffects::avg_slopes, fun_args))
    6.     │ └─base::withCallingHandlers(...)
    7.     ├─base::do.call(marginaleffects::avg_slopes, fun_args)
    8.     ├─marginaleffects (local) `<fn>`(...)
    9.     │ └─base::eval.parent(call_attr)
   10.     │   └─base::eval(expr, p)
   11.     │     └─base::eval(expr, p)
   12.     ├─marginaleffects::slopes(...)
   13.     │ └─base::eval.parent(call_attr_c)
   14.     │   └─base::eval(expr, p)
   15.     │     └─base::eval(expr, p)
   16.     └─marginaleffects::comparisons(...)
   17.       ├─base::do.call("get_comparisons", args)
   18.       └─marginaleffects:::get_comparisons(...)
   19.         ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp]
   20.         └─data.table:::`[.data.table`(...)
  ── Error ('test-estimate_slopes.R:63:3'): estimate_slopes, johnson-neyman p-adjust ──
  Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 10/10 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─modelbased::estimate_slopes(model, "Petal.Width", by = "Petal.Length") at test-estimate_slopes.R:63:3
    2.   └─modelbased::get_marginaltrends(...)
    3.     ├─base::suppressWarnings(do.call(marginaleffects::avg_slopes, fun_args))
    4.     │ └─base::withCallingHandlers(...)
    5.     ├─base::do.call(marginaleffects::avg_slopes, fun_args)
    6.     ├─marginaleffects (local) `<fn>`(...)
    7.     │ └─base::eval.parent(call_attr)
    8.     │   └─base::eval(expr, p)
    9.     │     └─base::eval(expr, p)
   10.     ├─marginaleffects::slopes(...)
   11.     │ └─base::eval.parent(call_attr_c)
   12.     │   └─base::eval(expr, p)
   13.     │     └─base::eval(expr, p)
   14.     └─marginaleffects::comparisons(...)
   15.       ├─base::do.call("get_comparisons", args)
   16.       └─marginaleffects:::get_comparisons(...)
   17.         ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp]
   18.         └─data.table:::`[.data.table`(...)
  ── Error ('test-estimate_slopes.R:124:3'): estimate_slopes, custom comparison ──
  Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 10/10 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─modelbased::estimate_contrasts(...) at test-estimate_slopes.R:124:3
    2. └─modelbased:::estimate_contrasts.default(...)
    3.   └─modelbased::get_marginalcontrasts(...)
    4.     └─modelbased::estimate_slopes(...)
    5.       └─modelbased::get_marginaltrends(...)
    6.         ├─base::suppressWarnings(do.call(marginaleffects::avg_slopes, fun_args))
    7.         │ └─base::withCallingHandlers(...)
    8.         ├─base::do.call(marginaleffects::avg_slopes, fun_args)
    9.         ├─marginaleffects (local) `<fn>`(...)
   10.         │ └─base::eval.parent(call_attr)
   11.         │   └─base::eval(expr, p)
   12.         │     └─base::eval(expr, p)
   13.         ├─marginaleffects::slopes(...)
   14.         │ └─base::eval.parent(call_attr_c)
   15.         │   └─base::eval(expr, p)
   16.         │     └─base::eval(expr, p)
   17.         └─marginaleffects::comparisons(...)
   18.           ├─base::do.call("get_comparisons", args)
   19.           └─marginaleffects:::get_comparisons(...)
   20.             ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp]
   21.             └─data.table:::`[.data.table`(...)
  ── Error ('test-transform_response.R:65:3'): estimate_slopes, transform ────────
  Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 10/10 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─modelbased::estimate_slopes(mod, trend = "Sepal.Width", by = "Species") at test-transform_response.R:65:3
    2.   └─modelbased::get_marginaltrends(...)
    3.     ├─base::suppressWarnings(do.call(marginaleffects::avg_slopes, fun_args))
    4.     │ └─base::withCallingHandlers(...)
    5.     ├─base::do.call(marginaleffects::avg_slopes, fun_args)
    6.     ├─marginaleffects (local) `<fn>`(...)
    7.     │ └─base::eval.parent(call_attr)
    8.     │   └─base::eval(expr, p)
    9.     │     └─base::eval(expr, p)
   10.     ├─marginaleffects::slopes(...)
   11.     │ └─base::eval.parent(call_attr_c)
   12.     │   └─base::eval(expr, p)
   13.     │     └─base::eval(expr, p)
   14.     └─marginaleffects::comparisons(...)
   15.       ├─base::do.call("get_comparisons", args)
   16.       └─marginaleffects:::get_comparisons(...)
   17.         ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp]
   18.         └─data.table:::`[.data.table`(...)
  ── Error ('test-visualisation_recipe.R:151:3'): visualization_recipe ───────────
  Error in ``[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp)`: attempt access index 15/15 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─modelbased::estimate_slopes(model, trend = "Sepal.Width") at test-visualisation_recipe.R:151:3
    2.   └─modelbased::get_marginaltrends(...)
    3.     ├─base::suppressWarnings(do.call(marginaleffects::avg_slopes, fun_args))
    4.     │ └─base::withCallingHandlers(...)
    5.     ├─base::do.call(marginaleffects::avg_slopes, fun_args)
    6.     ├─marginaleffects (local) `<fn>`(...)
    7.     │ └─base::eval.parent(call_attr)
    8.     │   └─base::eval(expr, p)
    9.     │     └─base::eval(expr, p)
   10.     ├─marginaleffects::slopes(...)
   11.     │ └─base::eval.parent(call_attr_c)
   12.     │   └─base::eval(expr, p)
   13.     │     └─base::eval(expr, p)
   14.     └─marginaleffects::comparisons(...)
   15.       ├─base::do.call("get_comparisons", args)
   16.       └─marginaleffects:::get_comparisons(...)
   17.         ├─out[, `:=`(tmp_idx, seq_len(.N)), by = tmp]
   18.         └─data.table:::`[.data.table`(...)
  
  [ FAIL 6 | WARN 0 | SKIP 54 | PASS 194 ]
  Error:
  ! Test failures.
  Execution halted