Learn R Programming

parallel (version 3.3.2)

splitIndices: 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

Run this code
splitIndices(20, 3)

Run the code above in your browser using DataLab