Sub-sample using the conditional Latin hypercube sampling (CLHS)
Source:R/sample_existing_clhs.R
sample_existing_clhs.Rd
This 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
mraster
to 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. IfTRUE
return a list where$details
is additional stratification information and$raster
is the output stratification spatRaster.- filename
Character. Path to write output samples.
- overwrite
Logical. Choice to overwrite existing
filename
if it exists.- ...
Additional arguments for clhs sampling. See
clhs
.