Skip to contents

Splits in n chunks

Usage

n_chunks(d, n, ...)

Arguments

d

data

n

number of chunks

...

arguments passed to internal chunks_of_n()

Value

List of chunks

Examples

lengths(n_chunks(d=seq_len(100),n=7,even=TRUE))
#>  1  2  3  4  5  6  7 
#> 15 15 14 14 14 14 14 
lengths(n_chunks(d=seq_len(100),n=7,even=FALSE))
#>  1  2  3  4  5  6  7 
#> 15 15 15 15 15 15 10