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

vicinity

The neighbouring faces of faces in an icosahedral grid


Description

This function will return neighbouring faces of the input faces.

Usage

vicinity(gridObj, faces, ...)

## S4 method for signature 'trigrid,character'
vicinity(
  gridObj,
  faces,
  order = 1,
  output = "vector",
  self = TRUE,
  namedorder = FALSE,
  ...
)

Arguments

gridObj

(trigrid or hexagrid) Icosahedral grid object.

faces

(character) A vector specifying names of faces.

...

Arguments passed to the ego function.

order

(numeric) Passed to the ego function, an integer value specifying the size of the neighborhood around a face.

output

(character) The type of the output. The default "vector" will give back the names of the faces that adjacent to the faces specified, including themselves. "list" will return a list.

self

(logical) Flag indicating whether the input faces should be in the output. For the "list" output option, the input face names will be omitted only from those character vectors that contain face names that are related to the face in question.

namedorder

(logical) Should the orders of the neighbouring cells be reported (TRUE) or just the names of the cells (default, FALSE).

Value

A character vector or a list of character vectors.

Examples

g <- trigrid(3)
ne <- vicinity(g, c("F4", "F10"))
ne

icosa

Global Triangular and Penta-Hexagonal Grids Based on Tessellated Icosahedra

v0.10.1
GPL-3
Authors
Adam T. Kocsis [aut, cre]
Initial release
2021-01-12

We don't support your browser anymore

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