cell_to_childpos {h3jsr} | R Documentation |
Cell to Child position
Description
Get the position of the cell within an ordered list of all children of the cell's parent at the specified resolution.
Usage
cell_to_childpos(h3_address = NULL, parent_res = NULL, simple = TRUE)
Arguments
h3_address |
Character; 15-character index generated by H3. |
parent_res |
numeric; resolution of reference parent cell. |
simple |
Logical; whether to return a vector or a data frame containing both inputs and outputs. |
Value
Numeric, Position of child within parent at 'parent_res'.
Note
Function will return 0 if 'parent_res' is the same as the resolution of the supplied cell.
Examples
# example address has resolution 7
cell_to_childpos('872830b82ffffff', c(3,4,5,6), simple = FALSE)
[Package h3jsr version 1.3.1 Index]