Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_pentagons

get the pentagon indices for an H3 resolution


Description

This function returns the indices of all pentagons occurring at a given H3 resolution.

Usage

get_pentagons(res = NULL, simple = TRUE)

Arguments

res

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

simple

Logical; whether to return outputs as list of outputs (TRUE) or data frame with both inputs and outputs.

Value

By default, a list of length(h3_address). Each list element contains a vector of twelve H3 addresses. If simple = FALSE, a data frame with a column of input resolutions and a list-column of pentagon indexes for each.

Examples

# Which indexes are pentagons at resolution 7?
get_pentagons(res = 7)

h3jsr

Access Uber's H3 Library

v1.2.2
Apache License (>= 2)
Authors
Lauren O'Brien [aut, cre] (<https://orcid.org/0000-0002-7336-2171>)
Initial release
2021-06-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.