This function will return neighbouring faces of the input faces.
vicinity(gridObj, faces, ...)# S4 method for trigrid,character
vicinity(
gridObj,
faces,
order = 1,
output = "vector",
self = TRUE,
namedorder = FALSE,
...
)
A character
vector or a list
of character
vectors.
(trigrid
or hexagrid
) Icosahedral grid object.
(character
) A vector specifying names of faces.
Arguments passed to the ego
function.
(numeric
) Passed to the ego
function, an integer value specifying the size of the neighborhood around a face.
(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.
(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.
(logical
) Should the orders of the neighbouring cells be reported (TRUE
) or just the names of the cells (default, FALSE
).
g <- trigrid(3)
ne <- vicinity(g, c("F4", "F10"))
ne
Run the code above in your browser using DataLab