cellToParent {h3r}R Documentation

Cell To Parent

Description

Provides the parent (coarser) index containing cell

Usage

cellToParent(cell, parentRes)

Arguments

cell

vector of H3 cells

parentRes

integer vector specifying the parent resolution for each cell

Value

vector of parent cells for each cell

Examples


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

## The `parentRes` should be a lower value than the result of  `getResolution()`
cellToParent(cell = rep(cell, 2), parentRes = c(11L, 10L))

## Specifying a single resolution
cells <- c("8cbe63562a54bff", "8cbe635631103ff")
getResolution(cell = cells)

cellToParent(cell = cells, parentRes = 6)
cellToParent(cell = cells, parentRes = 7)


[Package h3r version 0.1.1 Index]