chunkr: chunkr splits a dataset into chunks

View source: R/chunkr.R

chunkrR Documentation

chunkr splits a dataset into chunks

Description

splits a dataset into a specified number of chunks so that they can be processed sequentially

Usage

chunkr(mydf, nchunks = 1L, ...)

Arguments

mydf

the dataframe to be used.

nchunks

an integer target number of chunks in which the dataframe is to be split (1 <= nchunks <= N) where N is the number of units.

...

a list of one or more variables that defines the units which should not be split apart.

Details

The splitting is done in terms of units defined by the combinations of the levels of one or more variables. Any output files will be produced in .rds format.

Examples

mydf <- mtcars
nchunks <- chunkr(mydf, nchunks = 100L, "gear")
nchunks



alexmitrani/humblr documentation built on April 4, 2022, 8:29 a.m.