array_split: Split a matrix into N chunks by row

Description Usage Arguments Details Value

Description

Helper function to split a matrix into N evenly-sized chunks.

Usage

1
array_split(data, n_chunks)

Arguments

data

Matrix or data.frame to split by row

n_chunks

[integer] Number of chunks to split the table into

Details

Pulled from StackOverflow: https://bit.ly/3rksN2N

Value

List of length 'n_chunks', each containing a sub-matrix or data.frame


njhenry/covidemr documentation built on Feb. 2, 2022, 2:31 a.m.