Skip to contents

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. If TRUE 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.

Value

A subsampled SpatialPointsDataFrame object.