Skip to contents

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)
#> [[1]]
#>  [1] "870800000ffffff" "871c00000ffffff" "873000000ffffff" "874c00000ffffff"
#>  [5] "876200000ffffff" "877400000ffffff" "877e00000ffffff" "879000000ffffff"
#>  [9] "87a600000ffffff" "87c200000ffffff" "87d600000ffffff" "87ea00000ffffff"
#>