num_cells: Get total H3 cells

View source: R/info_utilities.R

num_cellsR Documentation

Get total H3 cells

Description

This function returns total number of H3 cells at a given resolution.

Usage

num_cells(res = NULL, fast = TRUE)

Arguments

res

Integer; Desired H3 resolution. See https://h3geo.org/docs/core-library/restable/ for allowable values and related dimensions.

fast

Logical; whether to retrieve values from a locally stored table or recalculate from source.

Value

Numeric; H3 cell count.

Note

Above resolution 8 the exact count cannot be represented in a JavaScript 32-bit number, so consumers should use caution when applying further operations to the output.

Examples

# Return cell count for resolution 8
num_cells(res = 8)


obrl-soil/h3jsr documentation built on Jan. 27, 2024, 4:33 a.m.