Generate suitability raster for a single niche state
Source:R/project_niche.R
project_single_niche.RdConvenience wrapper that projects a single niche (mu, Sigma) onto a geographic raster using xnicher's habitat-suitability engine.
Usage
project_single_niche(
mu,
Sigma,
env,
output = "",
overwrite = FALSE,
return_log = FALSE,
threads = NULL
)Arguments
- mu
Numeric vector of length
P, niche centroid.- Sigma
Symmetric positive-definite
P x Pmatrix.- env
A multi-layer
SpatRasterfrom terra, with one layer per environmental variable.- output
Character. File path for output GeoTIFF. If
""(default), returns an in-memorySpatRaster.- overwrite
Logical. Whether to overwrite existing output file.
- return_log
Logical. If
FALSE(default), returns suitability \(S(x) \in (0, 1]\). IfTRUE, returns log-suitability \(\log S(x) \le 0\).- threads
Integer. Number of parallel threads for the C++ kernel.