Skip to contents

Get the number of children for a cell at a given resolution.

Usage

cell_to_children_size(h3_address = NULL, child_res = NULL, simple = TRUE)

Arguments

h3_address

Character; 15-character index generated by H3.

child_res

numeric; child resolution to report on.

simple

Logical; whether to return a vector or a data frame containing both inputs and outputs.

Value

numeric; number of children at the requested resolution

Examples

# example address has resolution 7:
cell_to_children_size('872830b82ffffff', c(8,9,10,11), simple = FALSE)
#>        h3_address child_res child_size
#> 1 872830b82ffffff         8          7
#> 2 872830b82ffffff         9         49
#> 3 872830b82ffffff        10        343
#> 4 872830b82ffffff        11       2401