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

Description Usage Arguments Details

View source: R/chunk.R

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).


Kmisc documentation built on May 29, 2017, 1:43 p.m.

Search within the Kmisc package
Search all R packages, documentation and source code