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)
A matrix of cells to search from.
Radius within which to calculate local density.
Density selection mode: "H" for high, "L" for low, "M" for median density.
Coordinates of the chosen cell based on the specified density.