Learn R Programming

h3r (version 0.1.2)

cellToChildren: Cell To Children

Description

Returns all the H3 indexes contained by the input cell at the defined child resolution

Usage

cellToChildren(cell, childRes)

Value

a named list, where each element is the input cell, and the values of each element are the child H3 cells

Arguments

cell

vector of H3 cells

childRes

integer vector specifying the child resolution for each cell

Examples

Run this code

cell <- "8cbe63562a54bff"
currentResolution <- getResolution(cell = cell)

cellToChildren(cell, childRes = currentResolution + 1L)
cellToChildren(cell, childRes = currentResolution + 2L)

res0 <- getRes0Cells()
cellToChildren(res0[1], 1L)
cellToChildren(res0[1], 2L)

cellToChildren(res0[1:5], 1L:5L)

Run the code above in your browser using DataLab