Closed bschulth closed 3 years ago
This is a good point. It's obviously easiest to drop the stringsAsFactors
argument ... I wonder if it will cause any confusion for people who are still on R 3.x but updating their broom.mixed ... ?
Another option would be
as.data.frame() %>%
mutate_if(is.factor, as.character) %>%
which would convert back if necessary ...
In
broom.mixed:::tidy.glmmTMB
, a call is made toas.data.frame()
with argumentstringsAsFactors = FALSE
on a 'ranef.gmlmTMB' object at: https://github.com/bbolker/broom.mixed/blob/master/R/glmmTMB_tidiers.R#L257 .However in the 1.0.2.1 release of glmmTMB on 2020-07-02, it looks like they changed the functionality to no longer accept the
stringsAsFactor
argument.glmmTMB:::as.data.frame.ranef.glmmTMB (see https://github.com/glmmTMB/glmmTMB/blob/e83c7651abbfeba37ecb1d21c944b35eab5a719c/glmmTMB/R/methods.R#L1181) specifically, they changed their internal glmmTMB:::check_dots function (see https://github.com/glmmTMB/glmmTMB/blob/master/glmmTMB/R/utils.R#L683) to no longer support stringsAsFactors as an argment.
Example: # glmmTMB: 1.0.2.1 # broom.mixed: 0.2.6
# should produce error:
If looks like you can pass an extra arg of action = "message" (or "warning" or "stop"--the default)
Or perhaps, simply don't pass stringsAsFactors argument now.