Learn R Programming

h3r (version 0.1.2)

gridDisk: Grid Disk

Description

Get indices within k distance of the origin index.

Usage

gridDisk(cell, k)

Value

the indices within k distance of the origin index

Arguments

cell

vector of H3 cells

k

int distance

Details

Elements of the output array may be left as zero, which can happen when crossing a pentagon.

k-ring 0 is defined as the origin index, k-ring 1 is defined as k-ring 0 and all neighboring indexes, and so on.

Examples

Run this code

gridDisk(cell = c("8cbe63562a54bff","8cbe635631103ff"), k = c(1L, 2L))

Run the code above in your browser using DataLab