[Rd] syntax difference clusterExport in parallel and snow

Hervé Pagès hpages at fredhutch.org
Sat Dec 17 02:07:10 CET 2016

On 12/13/2016 09:33 AM, Prof Brian Ripley wrote:
> On 13/12/2016 17:05, Paul Johnson wrote:
>> We got some errors and eventually figured out that
>> parallel::clusterExport second argument is "varlist" while in
>> snow::clusterExport it is "list".
>> The user had loaded parallel first, but did something else which
>> inadvertently loaded snow, then clusterExport failed because we had
>> "varlist" and not "list".
>> Are these different on purpose?
> Yes.
> ('list' is an unhelpful name for an argument that is not a list.)

Yes 'list' is a misleading name for a character vector. OTOH I guess
snow::clusterExport() was just following the lead of base::save() and
base::remove() on this.

I don't see 'varlist' as being much less confusing though: it still
suggests that the thing is a list and parallel::clusterExport() is
now inconsistent with snow::clusterExport(). So it doesn't really
address the 1st problem and introduces a new one. Sounds like using
a plural form instead of the "list" prefix would be less confusing
e.g. 'vars', 'varnames', 'objnames' or something like that.


Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

More information about the R-devel mailing list