Jan Stanstrup Jan Stanstrup - 1 year ago 122
R Question

dplyr::failwith doesn't work with lme4::lmer but does with lm

I had a workflow that used to work with

. Now it seems to be broken.
What I am doing works with
so I wonder if it is a bug or I need to change something.

This works:


lmer( Yield ~ 1|Batch, Dyestuff, REML = FALSE)
lm( Yield ~ Batch, Dyestuff)

But this does not for
but does for

lmer_fw <- failwith(NULL,lmer ,quiet=TRUE)
lm_fw <- failwith(NULL,lm , quiet=TRUE)

lmer_fw(Yield ~ 1|Batch, Dyestuff, REML = FALSE)
lm_fw( Yield ~ Batch, Dyestuff)

has same behaviour.

Any ideas?

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] lme4_1.1-12 Matrix_1.2-7.1 dplyr_0.5.0 RevoUtilsMath_8.0.3

loaded via a namespace (and not attached):
[1] Rcpp_0.12.7 lattice_0.20-34 assertthat_0.1 MASS_7.3-45 grid_3.3.1 R6_2.1.3 nlme_3.1-128 DBI_0.5-1
[9] magrittr_1.5 minqa_1.2.4 nloptr_1.0.4 splines_3.3.1 RevoUtils_10.0.1 tools_3.3.1 tibble_1.2

Answer Source

This is the same issue as https://github.com/lme4/lme4/issues/369 , which I had fixed on a branch but just now got around to pulling into the main development version. If you install the devel version (1.1-13) via devtools::install_github("lme4/lme4" it should work now. (If you need a binary version, let the maintainers know ...)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download