Running ‘testthat.R’ [100s/152s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(afex)
  Loading required package: lme4
  Loading required package: Matrix
  ************
  Welcome to afex. For support visit: http://afex.singmann.science/
  - Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
  - Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
  - 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
  - Get and set global package options with: afex_options()
  - Set sum-to-zero contrasts globally: set_sum_contrasts()
  - For example analyses see: browseVignettes("afex")
  ************
  
  Attaching package: 'afex'
  
  The following object is masked from 'package:lme4':
  
      lmer
  
  > 
  > test_check("afex")
  Mixed Model Anova Table (Type 3 tests, S-method)
  
  Model: value ~ treatment + (1 | id)
  Data: obk.long
       Effect       df      F p.value
  1 treatment 2, 13.00 2.91 +    .090
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
  Mixed Model Anova Table (Type 3 tests, S-method)
  
  Model: value ~ treatment + phase + (1 | id)
  Data: obk.long
       Effect        df         F p.value
  1 treatment  2, 13.00    2.91 +    .090
  2     phase 2, 222.00 38.48 ***   <.001
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
  Mixed Model Anova Table (Type 3 tests, LRT-method)
  
  Model: value ~ treatment + (1 | id)
  Data: obk.long
  Df full model: 5
       Effect df  Chisq p.value
  1 treatment  2 5.93 +    .052
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
  Mixed Model Anova Table (Type 3 tests, LRT-method)
  
  Model: value ~ treatment + phase + (1 | id)
  Data: obk.long
  Df full model: 7
       Effect df     Chisq p.value
  1 treatment  2    5.93 +    .052
  2     phase  2 66.67 ***   <.001
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
  Mixed Model Anova Table (Type 3 tests, PB-method)
  
  Model: use ~ urban + (1 | district)
  Data: Contraception
    Effect df Chisq p.value
  1  urban  1 31.28    .333
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
  Mixed Model Anova Table (Type 3 tests, PB-method)
  
  Model: use ~ urban + livch + (1 | district)
  Data: Contraception
    Effect df Chisq p.value
  1  urban  1 36.33    .333
  2  livch  3 77.91    .333
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
  [ FAIL 8 | WARN 4 | SKIP 27 | PASS 313 ]
  
  ══ Skipped tests (27) ══════════════════════════════════════════════════════════
  • On CRAN (26): 'test-afex_plot-basics.R:11:3', 'test-afex_plot-basics.R:76:3',
    'test-afex_plot-basics.R:140:3', 'test-afex_plot-basics.R:339:3',
    'test-afex_plot-bugs.R:6:3', 'test-afex_plot-bugs.R:21:3',
    'test-afex_plot-bugs.R:43:3', 'test-afex_plot-bugs.R:79:3',
    'test-afex_plot-default-support.R:11:3',
    'test-afex_plot-default-support.R:20:3',
    'test-afex_plot-default-support.R:38:3',
    'test-afex_plot-default-support.R:66:3', 'test-afex_plot-vignette.R:4:3',
    'test-afex_plot-vignette.R:38:3', 'test-afex_plot-vignette.R:114:3',
    'test-aov_car-bugs.R:253:3', 'test-emmeans-interface.R:144:3',
    'test-emmeans-interface.R:209:3', 'test-mixed-bugs.R:6:3',
    'test-mixed-bugs.R:19:3', 'test-mixed-structure.R:214:5',
    'test-mixed-structure.R:242:3', 'test-mixed-structure.R:264:3',
    'test-mixed-structure.R:305:3', 'test-mixed-structure.R:349:3',
    'test-mixed-structure.R:369:3'
  • empty test (1): 'test-mixed-structure.R:86:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-afex_plot-basics.R:109:3'): lme4::merMod plots are produced ────
  Error in `tcrossprod(sc * Li)`: "tcrossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. ├─afex::afex_plot(Oats.lmer, "nitro", id = "VarBlock") at test-afex_plot-basics.R:109:2
    2. └─afex:::afex_plot.merMod(Oats.lmer, "nitro", id = "VarBlock")
    3.   └─afex:::get_emms(...)
    4.     ├─base::as.data.frame(...)
    5.     ├─base::do.call(...)
    6.     └─emmeans (local) `<fn>`(...)
    7.       ├─base::do.call(ref_grid, args)
    8.       └─emmeans (local) `<fn>`(object = `<lmrMdLmT>`, type = "response", wt.nuis = "equal")
    9.         ├─emmeans::emm_basis(...)
   10.         └─emmeans:::emm_basis.merMod(...)
   11.           └─pbkrtest::vcovAdj.lmerMod(object, 0)
   12.             ├─pbkrtest::get_SigmaG(object, details)
   13.             └─pbkrtest:::get_SigmaG.lmerMod(object, details)
   14.               └─pbkrtest:::.get_SigmaG(object, details)
   15.                 ├─nlme::VarCorr(object)
   16.                 └─lme4:::VarCorr.merMod(object)
   17.                   ├─base::structure(...)
   18.                   └─lme4::mkVarCorr(...)
   19.                     └─base::lapply(...)
   20.                       └─lme4 (local) FUN(X[[i]], ...)
  ── Error ('test-afex_plot-bugs.R:99:3'): non-factor IVs work with factor_levels argument ──
  Error in `crossprod(Lamt, LL)`: "crossprod" is not a BUILTIN function
  Backtrace:
      ▆
   1. ├─afex::afex_plot(...) at test-afex_plot-bugs.R:99:2
   2. └─afex:::afex_plot.mixed(...)
   3.   ├─base::unique(names(lme4::ranef(full_model)))
   4.   ├─lme4::ranef(full_model)
   5.   └─lme4:::ranef.merMod(full_model)
   6.     ├─lme4:::arrange.condVar(object, condVar(object, scaled = TRUE))
   7.     │ └─lme4:::bdiag_to_mlist(cv, n)
   8.     └─lme4:::condVar(object, scaled = TRUE)
  ── Error ('test-emmeans-interface.R:180:3'): mixed works with type=2 and all methods ──
  Error in `tcrossprod(sc * Li)`: "tcrossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. └─afex::mixed(...) at test-emmeans-interface.R:180:2
    2.   ├─pbkrtest::KRmodcomp(full_model[[order.c]], fits[[c]])
    3.   └─pbkrtest:::KRmodcomp.lmerMod(full_model[[order.c]], fits[[c]])
    4.     ├─pbkrtest::vcovAdj(largeModel, details)
    5.     └─pbkrtest::vcovAdj.lmerMod(largeModel, details)
    6.       ├─pbkrtest::get_SigmaG(object, details)
    7.       └─pbkrtest:::get_SigmaG.lmerMod(object, details)
    8.         └─pbkrtest:::.get_SigmaG(object, details)
    9.           ├─nlme::VarCorr(object)
   10.           └─lme4:::VarCorr.merMod(object)
   11.             ├─base::structure(...)
   12.             └─lme4::mkVarCorr(...)
   13.               └─base::lapply(...)
   14.                 └─lme4 (local) FUN(X[[i]], ...)
  ── Error ('test-emmeans-interface.R:193:3'): emmeans works with mixed and expand_er = TRUE ──
  Error in `tcrossprod(sc * Li)`: "tcrossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. └─emmeans::emmeans(m2, "Machine", lmer.df = "kenward-roger") at test-emmeans-interface.R:193:2
    2.   ├─base::do.call(ref_grid, args)
    3.   └─emmeans (local) `<fn>`(object = `<mixed>`, lmer.df = "kenward-roger", wt.nuis = "equal")
    4.     └─emmeans::emm_basis(...)
    5.       └─afex (local) emb(object, trms, xlev, grid, ...)
    6.         ├─emmeans::emm_basis(obj_use, trms, xlev, grid, ...)
    7.         └─emmeans:::emm_basis.merMod(obj_use, trms, xlev, grid, ...)
    8.           └─pbkrtest::vcovAdj.lmerMod(object, 0)
    9.             ├─pbkrtest::get_SigmaG(object, details)
   10.             └─pbkrtest:::get_SigmaG.lmerMod(object, details)
   11.               └─pbkrtest:::.get_SigmaG(object, details)
   12.                 ├─nlme::VarCorr(object)
   13.                 └─lme4:::VarCorr.merMod(object)
   14.                   ├─base::structure(...)
   15.                   └─lme4::mkVarCorr(...)
   16.                     └─base::lapply(...)
   17.                       └─lme4 (local) FUN(X[[i]], ...)
  ── Error ('test-mixed-bugs.R:160:3'): lmer_alt works with custom contrasts ─────
  Error in `crossprod(Lamt, LL)`: "crossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. ├─testthat::expect_identical(...) at test-mixed-bugs.R:160:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::colnames(ranef(mafex)$Subj)
    5. │ └─base::is.data.frame(x)
    6. ├─nlme::ranef(mafex)
    7. └─lme4:::ranef.merMod(mafex)
    8.   ├─lme4:::arrange.condVar(object, condVar(object, scaled = TRUE))
    9.   │ └─lme4:::bdiag_to_mlist(cv, n)
   10.   └─lme4:::condVar(object, scaled = TRUE)
  ── Error ('test-mixed-structure.R:9:3'): mixed: Maxell & Delaney (2004), Table 16.4, p. 842: Type 2 ──
  Error in `tcrossprod(sc * Li)`: "tcrossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. └─afex::mixed(...) at test-mixed-structure.R:9:2
    2.   ├─pbkrtest::KRmodcomp(full_model[[order.c]], fits[[c]])
    3.   └─pbkrtest:::KRmodcomp.lmerMod(full_model[[order.c]], fits[[c]])
    4.     ├─pbkrtest::vcovAdj(largeModel, details)
    5.     └─pbkrtest::vcovAdj.lmerMod(largeModel, details)
    6.       ├─pbkrtest::get_SigmaG(object, details)
    7.       └─pbkrtest:::get_SigmaG.lmerMod(object, details)
    8.         └─pbkrtest:::.get_SigmaG(object, details)
    9.           ├─nlme::VarCorr(object)
   10.           └─lme4:::VarCorr.merMod(object)
   11.             ├─base::structure(...)
   12.             └─lme4::mkVarCorr(...)
   13.               └─base::lapply(...)
   14.                 └─lme4 (local) FUN(X[[i]], ...)
  ── Error ('test-mixed-structure.R:22:3'): mixed: Maxell & Delaney (2004), Table 16.4, p. 842: Type 3 ──
  Error in `tcrossprod(sc * Li)`: "tcrossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. └─afex::mixed(...) at test-mixed-structure.R:22:2
    2.   ├─pbkrtest::KRmodcomp(full_model, fits[[c]])
    3.   └─pbkrtest:::KRmodcomp.lmerMod(full_model, fits[[c]])
    4.     ├─pbkrtest::vcovAdj(largeModel, details)
    5.     └─pbkrtest::vcovAdj.lmerMod(largeModel, details)
    6.       ├─pbkrtest::get_SigmaG(object, details)
    7.       └─pbkrtest:::get_SigmaG.lmerMod(object, details)
    8.         └─pbkrtest:::.get_SigmaG(object, details)
    9.           ├─nlme::VarCorr(object)
   10.           └─lme4:::VarCorr.merMod(object)
   11.             ├─base::structure(...)
   12.             └─lme4::mkVarCorr(...)
   13.               └─base::lapply(...)
   14.                 └─lme4 (local) FUN(X[[i]], ...)
  ── Error ('test-mixed-structure.R:181:3'): mixed: expand_re argument, return = 'merMod' ──
  Error in `tcrossprod(sc * Li)`: "tcrossprod" is not a BUILTIN function
  Backtrace:
       ▆
    1. ├─testthat::expect_identical(...) at test-mixed-structure.R:181:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::unlist(summary(m2)$varcor)
    5. ├─base::summary(m2)
    6. └─afex:::summary.mixed(m2)
    7.   ├─base::summary(...)
    8.   └─lmerTest:::summary.lmerModLmerTest(...)
    9.     ├─base::summary(as(object, "lmerMod"), ...)
   10.     └─lme4:::summary.merMod(as(object, "lmerMod"), ...)
   11.       ├─nlme::VarCorr(object)
   12.       └─lme4:::VarCorr.merMod(object)
   13.         ├─base::structure(...)
   14.         └─lme4::mkVarCorr(...)
   15.           └─base::lapply(...)
   16.             └─lme4 (local) FUN(X[[i]], ...)
  
  [ FAIL 8 | WARN 4 | SKIP 27 | PASS 313 ]
  Deleting unused snapshots:
  • afex_plot-basics/afex-plot-connecting-individual-points-works.svg
  • afex_plot-basics/geoms-work-box-plot.svg
  • afex_plot-basics/geoms-work-boxjitter-1.svg
  • afex_plot-basics/geoms-work-boxjitter-2.svg
  • afex_plot-basics/geoms-work-boxjitter-3.svg
  • afex_plot-basics/geoms-work-geom-count.svg
  • afex_plot-basics/geoms-work-ggbeeswarm-geom-beeswarm.svg
  • afex_plot-basics/geoms-work-ggbeeswarm-geom-quasirandom.svg
  • afex_plot-basics/geoms-work-jitterdodge.svg
  • afex_plot-basics/geoms-work-violin-with-colour.svg
  • afex_plot-basics/geoms-work-violin.svg
  • afex_plot-basics/lme4-mermod-plot-1.svg
  • afex_plot-basics/lme4-mermod-plot-2.svg
  • afex_plot-basics/lme4-mermod-plot-3.svg
  • afex_plot-basics/mixed-model-1.svg
  • afex_plot-basics/mixed-model-2.svg
  • afex_plot-basics/mixed-model-3.svg
  • afex_plot-basics/mixed-model-4.svg
  • afex_plot-basics/multiple-geoms-work-1.svg
  • afex_plot-basics/multiple-geoms-work-2.svg
  • afex_plot-basics/one-way-within.svg
  • afex_plot-basics/two-way.svg
  • afex_plot-basics/x-trace-panel.svg
  • afex_plot-bugs/afex-plot-binomial-glm-with-factor-2.svg
  • afex_plot-bugs/afex-plot-dv-y-works.svg
  • afex_plot-bugs/afex-plot-lmm-type-2.svg
  • afex_plot-bugs/afex-plot-mermod-objects-with-missing-data.svg
  • afex_plot-default-support/afex-plots-binomial-glm-1.svg
  • afex_plot-default-support/afex-plots-binomial-glm-2.svg
  • afex_plot-default-support/afex-plots-lm-model-2.svg
  • afex_plot-default-support/afex-plots-nlme-2.svg
  • afex_plot-default-support/afex-plots-nlme-3.svg
  • afex_plot-default-support/afex-plots-nlme-4.svg
  • afex_plot-default-support/afex-plots-nlme-5.svg
  • afex_plot-default-support/afex-plots-poisson-glm-1.svg
  • afex_plot-default-support/afex-plots-poisson-glm-2.svg
  • afex_plot-vignette/afex-plot-glmmtmb-1.svg
  • afex_plot-vignette/afex-plot-glmmtmb-2.svg
  • afex_plot-vignette/afex-plot-glmmtmb-3.svg
  Error: Test failures
  Execution halted