Logical if only the raster will be returned if n_random = 1
and return_input = FALSE.
verbose
Logical if progress report is printed.
Details
The function randomizes a habitat map with discrete classes (as SpatRaster) as proposed
by Harms et al. (2001) as “randomized-habitats procedure”. The algorithm starts with an
empty habitat map and starts to assign random neighbouring cells to each habitat
(in increasing order of abundance in observed map). We modified the procedure
slightly by increasing a probability to jump to a non-neighbouring cell as the
current patch becomes larger.
In case the SpatRaster contains NA cells, this needs to be reflected in the observation
window of the point pattern as well (i.e., no point locations possible in these areas).
References
Harms, K.E., Condit, R., Hubbell, S.P., Foster, R.B., 2001. Habitat associations of
trees and shrubs in a 50-ha neotropical forest plot. Journal of Ecology 89, 947–959.
<https://doi.org/10.1111/j.1365-2745.2001.00615.x>