diff --git a/math/R-cran-lme4/Makefile b/math/R-cran-lme4/Makefile index 13bcebf776ac..5c06cbc5d011 100644 --- a/math/R-cran-lme4/Makefile +++ b/math/R-cran-lme4/Makefile @@ -1,39 +1,37 @@ PORTNAME= lme4 DISTVERSION= 2.0-1 CATEGORIES= math DISTNAME= ${PORTNAME}_${DISTVERSION} MAINTAINER= eduardo@FreeBSD.org COMMENT= Linear mixed-effects models using Eigen and S4 WWW= https://cran.r-project.org/package=lme4 LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE.note CRAN_DEPENDS= R-cran-minqa>=1.1.15:math/R-cran-minqa \ R-cran-nloptr>=1.0.4:math/R-cran-nloptr \ R-cran-Rcpp>=0.10.5:devel/R-cran-Rcpp \ R-cran-RcppEigen>=0.3.3.9.4:math/R-cran-RcppEigen \ R-cran-reformulas>=0.4.3.1:math/R-cran-reformulas \ R-cran-rlang>0:devel/R-cran-rlang BUILD_DEPENDS= ${CRAN_DEPENDS} RUN_DEPENDS= ${CRAN_DEPENDS} TEST_DEPENDS= R-cran-ggplot2>0:graphics/R-cran-ggplot2 \ R-cran-knitr>0:print/R-cran-knitr \ R-cran-optimx>0:misc/R-cran-optimx \ R-cran-statmod>0:math/R-cran-statmod \ R-cran-testthat>0:devel/R-cran-testthat USES= cran:auto-plist,compiles -TESTING_UNSAFE= https://github.com/lme4/lme4/issues/942 - pre-test: # Test depends not ported yet .for pkg in gamm4 glmmTMB @${LOCALBASE}/bin/Rscript -e 'install.packages("${pkg}", \ repos = "https://cloud.r-project.org")' .endfor .include diff --git a/math/R-cran-lme4/files/patch-fix-test b/math/R-cran-lme4/files/patch-fix-test new file mode 100644 index 000000000000..1d1baacb55b1 --- /dev/null +++ b/math/R-cran-lme4/files/patch-fix-test @@ -0,0 +1,31 @@ +From f1888c31db92f03c93d1bf05ecca1ac8a43c0935 Mon Sep 17 00:00:00 2001 +From: Ben Bolker +Date: Sat, 7 Mar 2026 10:59:42 -0500 +Subject: [PATCH] loosen tolerance in isSingular test [run ci] + +--- + tests/testthat/test-isSingular.R | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git tests/testthat/test-isSingular.R tests/testthat/test-isSingular.R +index 33d47579..7d41562a 100644 +--- tests/testthat/test-isSingular.R ++++ tests/testthat/test-isSingular.R +@@ -21,7 +21,7 @@ test_that("checking singular fit for covariance", { + + test.reCovs <- c(test.us, test.diag, test.cs, test.homcs, test.ar1, test.hetar1) + +- ## tests should fail once one of the diagional entries is 0 ++ ## tests should fail once one of the diagonal entries is 0 + sapply(test.reCovs, function(i){ + new_theta <- getTheta(i) + new_theta[1] <- 0 +@@ -74,7 +74,7 @@ test_that("checking singular fit for merMod", { + sigma = 2))[[1]] + mod2 <- suppressWarnings(lmer(form2, data = dat)) + ## second one, should be an issue with group 1 as we set thetas = 0 +- expect_equal(isSingular(mod2), TRUE) ++ expect_equal(isSingular(mod2, tol = 5e-4), TRUE) + + ## also need to consider the glmer case + form <- y ~ 1 + (1 + x1 | group1) + (1 + x2 | group2)