powered by
This divides up 1:nx into ncl lists of approximately equal size, as a way to allocate tasks to nodes in a cluster.
1:nx
ncl
It is mainly for internal use, but some package authors have found it useful.
splitIndices(nx, ncl)
Number of tasks.
Number of cluster nodes.
A list of length ncl, each element being an integer vector.
splitIndices(20, 3)
Run the code above in your browser using DataLab