split_work: Define parallel work splits

View source: R/split_work.R

split_workR Documentation

Define parallel work splits

Description

Define an index of work splits for parallel processing

Usage

split_work(length, cores)

Arguments

length

the length of an object to split (nrows, list length, etc)

cores

the number of cores available on your machine. Typically parallel::detectCores() - 1.

Details

This function accepts an integar defining the length of you object to be split and will return a list of length equal to n_cores. This can be used to split up an object for use in parallel processing such as mclapply

Value

a list of length equal to the value of cores


MatthewJWhittle/spatialutils documentation built on March 16, 2023, 11:30 p.m.