are_neighbours {h3jsr}R Documentation

check if H3 cells are neighbours

Description

This function checks whether two H3 cells share an edge.

Usage

are_neighbours(origin = NULL, destination = NULL, simple = TRUE)

Arguments

origin

Character; 15-character cell index generated by H3. A vector of indexes can also be supplied.

destination

Character; 15-character cell index generated by H3. A vector of indexes can also be supplied.

simple

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

Value

Logical; TRUE if neighbours.

Note

Examples

# Are the following cells neighbours?
are_neighbours(origin = '86be8d12fffffff', destination = '86be8d127ffffff')


[Package h3jsr version 1.3.1 Index]