This function takes a data frame of existing data, a data frame of desired sample sizes for each strata, the number of samples to take, and optionally a file name and overwrite parameter. It returns a sample of the existing data based on the desired sample sizes for each strata, and optionally writes the resulting samples to a file.
sample_existing_strat(
existing,
toSample,
nSamp,
filename = NULL,
overwrite = FALSE
)
An sf
object that is a sub-sample of existing
sf 'POINT'. Existing plot network.
A data frame specifying the desired sample sizes for each strata.
Numeric. Number of desired samples. existing
, include
and force
influence this value.
Character. Path to write output samples.
Logical. Choice to overwrite existing filename
if it exists.