The R Project SVN R

Rev

Rev 67599 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
57325 ripley 1
% File src/library/parallel/man/splitIndices.Rd
68948 ripley 2
% Part of the R package, https://www.R-project.org
67599 ripley 3
% Copyright 2003-2014 R Core Team
57325 ripley 4
% Distributed under GPL 2 or later
5
 
6
\name{splitIndices}
7
\alias{splitIndices}
8
 
9
\title{Divide Tasks for Distribution in a Cluster}
10
\description{
11
  This divides up \code{1:nx} into \code{ncl} lists of approximately
57335 ripley 12
  equal size, as a way to allocate tasks to nodes in a cluster.
61433 ripley 13
 
57325 ripley 14
  It is mainly for internal use, but some package authors have found it useful.
15
}
16
\usage{
17
splitIndices(nx, ncl)
18
}
19
\arguments{
20
  \item{nx}{Number of tasks.}
21
  \item{ncl}{Number of cluster nodes.}
22
}
23
\value{
24
  A list of length \code{ncl}, each element being an integer vector.
25
}
26
\examples{
27
splitIndices(20, 3)
28
}
29
\keyword{ utility }