Learn R Programming

geeLite (version 1.0.2)

get_batch: Create Batches from an sf Object

Description

Divides an sf object (grid) into a list of chunks, either based on a specified number of batches (batch_num) or a maximum chunk size (batch_size).

Usage

get_batch(grid, batch_size = NULL, batch_num = NULL)

Value

(list) A list of sf objects (chunks).

Arguments

grid

[mandatory] (sf) The sf object to be split into chunks.

batch_size

[optional] (integer) Maximum rows per chunk. Must be set if batch_num is NULL.

batch_num

[optional] (integer) Total number of chunks to create. Must be set if batch_size is NULL.