This function finds a cell in a matrix based on the local density of a specified category (habitat or non-habitat). It can be set to find cells in high, low, or median density areas.

findCell(cells, radius = 5, Density = "M", deBug = FALSE)

Arguments

cells

A matrix of cells to search from.

radius

Radius within which to calculate local density.

Density

Density selection mode: "H" for high, "L" for low, "M" for median density.

Value

Coordinates of the chosen cell based on the specified density.