I'm developing an R package which needs to use parallelisation as made available by the snowfall
package. snowfall
doesn't seem to import the same was as other packages like ggplot2
, data.table
, etc. I've included snowfall
, rlecuyer
, and snow
in the description file, name space file, and as an import argument in the function itself. When I try to access this function, I get the following error:
Error in sfInit() : could not find function "setDefaultClusterOptions"
The sfInit
function seems to have a nostart
/ nostop
argument which it says is related to nested usage of sfInit
but that doesn't seem to do the trick for me either.
The actual code itself uses an sfInit
(which is where I get the error), some sfExport
s and sfLibrary
s, and an sfLapply
.
Possible solution:
It seems to work if I move snow
from the import section to the depends section in the Desciption file. I don't know why though.
importFrom snow setDefaultClusterOptions
but returning same error. – Incrementsnowfall
than it is costing you? As a usability wrapper I never felt like it improved my experience... but maybe I was already too far down the rabbit hole by the time I stumbled onto it. Unless you have some specialized reasons for wanting to usesnowfall
you may want to consider cran.r-project.org/web/packages/future/index.html. It is under active development and the author seems dedicated to supporting a pretty broad variety of backends. – Mejia