chunk: Generate a Sequence of Integers, and Split into Chunks

Description

This function takes a set of endpoints, and 'chunks' the sequence from min to max into a list with each element of size size.

Usage

1
chunk(min, max, size, by = 1)

Arguments

min

The lower end (start point) of the sequence.

max

The upper end (end point) of the sequence.

size

The number of elements to place in each chunk.

by

The difference between consecutive elements.

Details

If max is not specified, then we generate a chunk of integers from 1 to min, each of size size. This allows you to specify chunks with syntax like chunk(100, size=5).


Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.