Skip to contents

Get coordinates adjacent to a point

Usage

get_adjacent_coords(
  yy,
  xx,
  nrow = NULL,
  ncol = NULL,
  data = NULL,
  yCount = 1,
  xCount = 1
)

Arguments

yy

The target y coordinate

xx

The target x coordinate

nrow

The maximum row value. Not needed if data is provided.

ncol

The maximum column value. Not needed if data is provided.

data

A matrix used to determine nrow and ncol if provided.

yCount

The number of rows to include on either side of the target

xCount

The number of columns to include on either side of the target

Value

A matrix of row and col coordinates

Details

Does NOT include the target point. If a wall is clipped, the coordinates will not include the clipped wall.