similar this question
but how clusterexport
package's non-exported function cluster? reason passed my tests before submitting cran isn't working in production. obviously, want fix , resubmit cran.
library(imputemulti) library(parallel) imputemulti:::count_compare # function exported nnodes <- 2l cl <- parallel::makecluster(nnodes) parallel::clusterexport(cl, varlist= c("count_compare")) # fails -- passed tests parallel::clusterexport(cl, varlist= c("count_compare"), envir= as.environment("package:imputemulti")) # fails
i'm using cluster export avoid cran/r cmd check note "use of :::
in package". obviously, export count_compare
, that's not desirable choice.
any appreciated!
adding tests information:
devtools::test("imputemulti", "count_levels") loading imputemulti testing imputemulti int- count_levels works: ............................... done ===========================================================================================================================================
you can use equivalent call clustercall
this.
parallel::clustercall(cl, assign, "count_compare", count_compare, envir = .globalenv)
see definition of clusterexport
verify doing same thing.
Comments
Post a Comment