splitIntoBatches: Split vector of n elements into batches

splitIntoBatchesR Documentation

Split vector of n elements into batches

Description

Given a total number of elements n and batch_size, contruct a vector of length n where

Usage

splitIntoBatches(n, batch_size)

Arguments

n

Length of the vector

batch_size

Size of each batch

Value

vector of integers where each integer occurs at most batch_size times.

Examples

splitIntoBatches(11,3)

kauralasoo/txrevise documentation built on March 31, 2022, 12:03 p.m.