I am trying to use parLapply again (now successfully used it in this context) but this time the function to parallelize contains some functions from the mc2d package (ie. deprt, ppert). I installed and loaded the package, before the parallel part of the code.
I successfully exported my variables to the cluster using cluster export,
clusterExport(C1, "variable")
...
However I tried to export the functions dpert and ppert using
clusterEvalQ(C1,dpert)
and I get the error
object C1 not found
how does it not find C1? is there another way to export R-packages functions to the cluster for parallel processing?
Use clusterExport for functions as well...
clusterExport(Cl,c('dpert','variable'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With