calculateChunks: Calculates number of chunks, returns chunk head/tail indices...

Description Usage Examples

Description

This function calculates the number of chunks to make, and returns head/tail index pairs c(head,tail) in a list list(c(head1,tail1) ... c(headn,tailn)) the maximum length of a chunk is given by the threshold parameter, which should be set according to the size of the data in each row, and the intensity of the calculation.

Usage

1
calculateChunks(len, threshold)

Examples

1
2
3
4
5
len <- nrow(mtcars)
chunks <- calculateChunks(len,10)%>%
	chunkIndices()

mtcars[chunkIndices[[1]],]

Peder2911/DB_gratia documentation built on May 26, 2019, 9:30 a.m.