0

I'm unable to get the lmerTest R package to work (it's used to provide statistical tests for objects created with the lme4 package)

When I load it, it gives the following error

Loading required package: Matrix
Loading required package: lme4
Error: package or namespace load failed for ‘lmerTest’ 
in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])

I've tried removing and re-installing both lmerTest and lme4, in both orders. I'm using the latest R version, both packages are installed in the correct library directory, and there are no permission issues. General solutions to this error when it comes up for other packages have not worked.

Eldur
  • 35
  • 1
  • 6
  • don't know, but also try re-installing `Matrix` (Matrix, then lme4, then lmerTest). – Ben Bolker Oct 30 '17 at 14:39
  • I get the same error. Don't know if this is relevant, but I'm running 64-bit R – Eldur Oct 30 '17 at 14:54
  • Hmm. Results of `sessionInfo()` (with Matrix and lme4 loaded) plus `packageVersion("lmerTest")` ? – Ben Bolker Oct 30 '17 at 15:00
  • 1
    Actually following your advice gave me another error: Error: package or namespace load failed for ‘lmerTest’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘checkmate’ Installing the checkmate package did the trick. Thanks! – Eldur Oct 30 '17 at 15:01
  • 1
    so you probably needed something like `install.packages("lmerTest",dependencies=TRUE)` – Ben Bolker Oct 30 '17 at 15:04
  • I guess so, although I thought I already tried that. I guess not all R packages are set to automatically download dependencies – Eldur Oct 30 '17 at 15:14
  • I ran into this issue, too. One of the packages that needed loaded was a newer version of `rlang`; the currently-isntalled version wasn't new enough to support the newest version of `lmerTest`. Since `rlang` was already running, I needed to quit `R`, then re-install `rlang` from `R` launched from a terminal. – wes Sep 12 '22 at 16:07

0 Answers0