Functions to create or work with H3Edge vectors. See Details for further details.

h3_edges(x, flat = FALSE)

h3_shared_edge_sparse(x, y)

h3_shared_edge_pairwise(x, y)

is_edge(x)

is_valid_edge(x)

h3_edges_from_strings(x)

flatten_edges(x)

h3_edge_cells(x)

h3_edge_origin(x)

h3_edge_destination(x)

# S3 method for H3Edge
as.character(x, ...)

Arguments

x

an H3 vector

flat

default FALSE. If TRUE return a single vector combining all edges of all H3 cells.

y

an H3 vector

...

unused.

Details

  • h3_edges(): returns a list of H3Edge vectors for each H3 index. When flat = TRUE, returns a single H3Edge vector.

  • h3_shared_edge_pairwise(): returns an H3Edge vector of shared edges. If there is no shared edge NA is returned.

  • h3_shared_edge_sparse(): returns a list of H3Edge vectors. Each element iterates through each element of y checking for a shared edge.

  • is_edge(): returns TRUE if the element inherits the H3Edge class.

  • is_valid_edge(): checks each element of a character vector to determine if it is a valid edge ID.

  • h3_edges_from_strings(): create an H3Edge vector from a character vector.

  • flatten_edges(): flattens a list of H3Edge vectors into a single H3Edge vector.

  • h3_edge_cells(): returns a list of length 2 named H3Edge vectors of origin and destination cells

  • h3_edge_origin(): returns a vector of H3Edge origin cells

  • h3_edge_destination(): returns a vector of H3Edge destination cells