discretise_habitat: Title

View source: R/discretise_habitat.R

discretise_habitatR Documentation

Title

Description

Title

Usage

discretise_habitat(
  habitat,
  max_size = as_units(5, "km^2"),
  min_size = as_units(0.5, "km^2"),
  patch_density = as_units(1, "1/km^2"),
  raster_size = as_units(0.05, "km^2"),
  raster_shape = c("hexagons", "squares"),
  h_adj = 0.5,
  point_density = as_units(100, "1/km^2"),
  verbose = 2L
)

Arguments

habitat

an sf data frame with active geometry column and Density column

max_size

maximum (approximate) size of output patches

min_size

minumum (approxiamte) size of output patches

patch_density

assumed density of output patches in terms of carrying capacity per km^2

raster_size

size of hexagons/squares used for rasterisation

raster_shape

one of hexagons or squares

h_adj

adjustment of the bandwidth used by MASS::kde2d()

point_density

density of points used for kde2d and k-means clustering

verbose

verbocity setting (0 = silent)

Examples

Then do a kernal density estimation:
The x/y dimensions depend on square vs hexagon:
TODO: the value chosen for h affects the extent of smoothing (currently half the default value)
TODO: for hexagons scale y h so that it is equivalent to x h i.e. accounts for aspect ratio

ku-awdc/HexScape documentation built on Jan. 10, 2025, 5:24 p.m.