You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are trying to use mice with a method provided by an add-on package (e.g., "2l.pmm" from the {miceadds} package), the methods don't seem to be available in parallel. That is, they aren't passed into future_map, and so aren't available on the workers.
library(mice)
#> #> Attaching package: 'mice'#> The following object is masked from 'package:stats':#> #> filter#> The following objects are masked from 'package:base':#> #> cbind, rbind
library(miceadds)
#> * miceadds 3.16-18 (2023-01-06 10:54:00)
Thanks for posting the issue and providing a (probably the) solution!
This is a known issue (related to #529), because this also happens for user-defined imputation functions, we are working for a slightly more generic solution (probably this in combination with a globals argument in future_map()), but some verification and checks need to be done still.
If you are trying to use mice with a method provided by an add-on package (e.g., "2l.pmm" from the
{miceadds}
package), the methods don't seem to be available in parallel. That is, they aren't passed into future_map, and so aren't available on the workers.Here's an example (modified from the miceadds docs.
Created on 2023-03-30 with reprex v2.0.2
As you can see, imp1 is fine, but imp2 using futuremice can't find the method.
The solution would seem to be to just pass in additional packages here:
mice/R/futuremice.R
Line 162 in 3e3e3ca
Happy to make a PR with this change.
The text was updated successfully, but these errors were encountered: