GetChunks: Get chunks of a specific size

Description Usage Arguments Details Value See Also

Description

From a vector obtain a list of chunks of a specific size

Usage

1
get_chunks(x, chunksize)

Arguments

x

Input vector

chunksize

The size of the chunks

Details

This is a utility functiion that facilitates chunked operations.

A common scenario is to chunk the indices of a specific object and then perform operations on the chunks separately and then later merge the output.

This can be useful in situations where multiple operations of smaller scope is preferrable to bulk processing.

Value

A list of objects of the same data type as input, each of size equal to the chunk size.

The last chunk may be smaller if the input's length is not a multiple of the LCM of the input's length and the chunks size.

See Also

get_chunked_redcap_data


bonmac/RedcapData documentation built on May 11, 2017, 1:34 p.m.