matloff / partools

Tools to aid coding in the R 'parallel' package.
40 stars 11 forks source link

cls should be the last argument #3

Open hadley opened 9 years ago

hadley commented 9 years ago

In most cases, I think the user will only have one cluster, and forcing then to think about it all the time, seems inelegant. Why not make it the last argument, default it to NULL, and then use the default cluster that parallel uses? This would allow you to still be explicit when wanted, but in data analysis code, it could be omitted.

matloff commented 9 years ago

Here my thinking was to be consistent with the 'parallel' package, which has 'cls' as the first argument for most of its functions. Making it default to NULL might be useful, though.