Learn R Programming

geeLite (version 1.0.2)

get_batches: Produce Batches for Build/Update Mixed Cases

Description

Divides the grid into one or two lists of chunked sf objects, depending on the data-collection case (1,2,3).

Usage

get_batches(cases, grid, batch_size)

Value

(list) A list of two elements, b1 and b2, each a list of sf subsets (chunks). b2 might be NULL if not needed.

Arguments

cases

[mandatory] (integer) 1=All build, 2=All update, 3=Mixed.

grid

[mandatory] (sf) The sf object (grid) containing column 'add' to distinguish existing vs. new rows.

batch_size

[mandatory] (integer) If cases = 1 or 2, we'll call get_batch(grid,batch_size=batch_size).