Skip to contents

Count how often each grid cell appeared in an evaluated layout over all generations (allCoords in the GA result). Never-tried cells stay light gray. Useful to see whether the search covered the area or stuck to a few sites.

Usage

plot_cell_heatmap(result, area, log = TRUE, plot = TRUE)

Arguments

result

The output of genetic_algorithm

area

Site polygon (sf, SpatialPolygons, or coordinate matrix). Must be projected in metres.

log

If TRUE, color the counts on a log1p scale so a few elite cells do not dominate the palette. Default is TRUE

plot

Deprecated alias for plot.

Value

A data.frame with grid ID, coordinates and visit count (n_probed), returned invisibly.

Examples

# \donttest{
plot_cell_heatmap(resultrect, sp_polygon)

# }