makeChunks | R Documentation |

*This is an internal function.*

```
makeChunks(
nbrOfElements,
nbrOfWorkers,
future.scheduling = 1,
future.chunk.size = NULL
)
```

`nbrOfElements` |
(integer) Total number of elements to iterate over. |

`nbrOfWorkers` |
(integer) Number of workers available. |

`future.scheduling` |
(numeric) A strictly positive scalar.
Only used if argument |

`future.chunk.size` |
(numeric) The maximum number of elements per
chunk, or |

A list of chunks, where each chunk is an integer vector of
unique indices `[1, nbrOfElements]`

. The union of all chunks
holds `nbrOfElements`

elements and equals `1:nbrOfElements`

.
If `nbrOfElements == 0`

, then an empty list is returned.

Attribute `ordering`

of `future.chunk.size`

or `future.scheduling`

can
be used to control the ordering the elements are iterated over, which
only affects the processing order *not* the order values are returned.
This attribute can take the following values:

index vector - an numeric vector of length

`nbrOfElements`

specifying how elements are remappedfunction - an function taking one argument which is called as

`ordering(nbrOfElements)`

and which must return an index vector of length`nbrOfElements`

, e.g.`function(n) rev(seq_len(n))`

for reverse ordering.-
`"random"`

- this will randomize the ordering via random index vector`sample.int(nbrOfElements)`

.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.