Rhpc_splitList: Split a list into chunks

View source: R/RhpcOp.R

Rhpc_splitListR Documentation

Split a list into chunks

Description

Divides a list or vector into approximately equal-sized chunks for distribution to workers.

Usage

Rhpc_splitList(var, num)

Arguments

var

vector or list to be split

num

number of chunks to create (typically equal to the number of workers)

Details

This function divides var into num roughly equal-sized chunks. It is useful for manually distributing work to workers when fine-grained control is needed.

This is primarily an internal utility; the apply-style functions handle splitting automatically.

Value

A list of length num, each element containing a portion of var.

See Also

Rhpc_lapply, Rhpc_numberOfWorker


Rhpc documentation built on Aug. 4, 2026, 1:07 a.m.