childpos_to_cell {h3jsr}R Documentation

Child position to cell

Description

Get the child cell at a given position within an ordered list of all children at the specified resolution.

Usage

childpos_to_cell(
  child_pos = NULL,
  h3_address = NULL,
  child_res = NULL,
  simple = TRUE
)

Arguments

child_pos

numeric; position of the child cell to get.

h3_address

Character; 15-character index generated by H3.

child_res

numeric; resolution of the child cell to return.

simple

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

Value

Character, H3 address of child

Note

'child_pos' is 0-indexed and capped at the maximum number of hexagons within the parent cell at the supplied resolution. This figure can be determined using cell_to_children_size.

Examples

# example address has resolution 7:
childpos_to_cell(0, '872830b82ffffff', 9, simple = FALSE)

[Package h3jsr version 1.3.1 Index]