splitIndices {parallel} | R Documentation

## Divide Tasks for Distribution in a Cluster

### Description

This divides up `1:nx` into `ncl` lists of approximately equal size, as a way to allocate tasks to nodes in a cluster.

It is mainly for internal use, but some package authors have found it useful.

### Usage

    splitIndices(nx, ncl)

### Arguments

`nx` | Number of tasks.
`ncl` | Number of cluster nodes.

### Value

A list of length `ncl`, each element being an integer vector.

### Examples

    splitIndices(20, 3)

[Package parallel version 2.15.1 Index]