split_vector: Generating indexes for splitting vector into chunks
Description
Generating indexes for splitting vector into chunks for parallel processing.Usage
split_vector(vector, splits, granularity = 1)
Arguments
splits
integer - controls number of parallel jobs you have planned.
Usually should be equal to number of cores in the machine. granularity
integer - granularity is useful for management of granularity
of splits. If you expect that computational time on each chunk of your data will
be distributed nerarly uniformly, granularity = 1 is good choice because of Value
- list each element is a integer vector pair.
First element in pair is lower index, second element is upper index.
Details
Parameters granularity and splits controls the numer of chunks in returned list.
Number of chunks in resulted list in general is equal granularity * splits