
Sub-sample using the conditional Latin hypercube sampling (CLHS)
Source:R/sample_existing_clhs.R
sample_existing_clhs.RdThis function takes an existing sf object and returns a random sub-sample of size nSamp.
Usage
sample_existing_clhs(
existing,
nSamp,
raster = NULL,
cost = NULL,
iter = 10000,
details = FALSE,
filename = NULL,
overwrite = FALSE,
...
)Arguments
- existing
sf 'POINT'. Existing plot network.
- nSamp
Numeric. Number of desired samples.
- cost
Numeric/Character. Index or name of covariate within
mrasterto be used to constrain cLHS sampling. If default (NULL), a cost constraint is not used.- iter
Numeric. Value giving the number of iterations within the Metropolis-Hastings process.
- details
Logical. If
FALSE(default) output is only stratification raster. IfTRUEreturn a list where$detailsis additional stratification information and$rasteris the output stratification spatRaster.- filename
Character. Path to write output samples.
- overwrite
Logical. Choice to overwrite existing
filenameif it exists.- ...
Additional arguments for clhs sampling. See
clhs.