Skip to contents

This function returns the parent of a particular H3 cell index at the requested resolution.

Usage

get_parent(h3_address = NULL, res = NULL, simple = TRUE)

Arguments

h3_address

Character; 15-character index generated by H3.

res

Integer; Desired H3 resolution. See https://h3geo.org/docs/core-library/restable/ for allowable values and related dimensions.

simple

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

Value

By default, a logical vector of length(h3_address).

Examples

# What is the parent of this cell at resolution 6?
get_parent(h3_address = '8abe8d12acaffff', res = 6)
#> [1] "86be8d12fffffff"