Learn R Programming

rplanes (version 0.1.0)

to_chunk: Chunk a vector

Description

This unexported helper function creates a list with contents of a vector spit into chunks. The user can specify how large each chunk should be with the "size" argument.

Usage

to_chunk(x, size)

Value

A list with as many elements as the number of chunks created. Each element will include vector with a length equal to the "size" specified.

Arguments

x

Vector to be split into chunks as large as the "size" specified

size

Width of the chunks for "x" vector