This function will return neighbouring faces of the input faces.
Usage
vicinity(gridObj, faces, ...)
# S4 method for trigrid,character
vicinity(
gridObj,
faces,
order = 1,
output = "vector",
self = TRUE,
namedorder = FALSE,
...
)
Arguments
- gridObj
- faces
(
character
) A vector specifying names of faces.- ...
Arguments passed to the
ego
function.- order
(
numeric
) Passed to theego
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
).