This function samples a given set of existing data using balanced sampling techniques, which ensures that each stratum or subgroup of data is proportionally represented in the sample.
sample_existing_balanced(
existing,
nSamp,
algorithm = "lpm2_kdtree",
p = NULL,
filename = NULL,
overwrite = FALSE,
...
)
An sf
object that is a sub-sample of existing
sf 'POINT'. Existing plot network.
Numeric. Number of desired samples.
Character. One of lpm2_kdtree, lcube, lcubestratified
.
Numeric. Vector with length equal to the number of cells in mraster
representing
the inclusion probability for each candidate sample. Default = nSamp / N
, where N
is the number of cells.
Character. Path to write output samples.
Logical. Specify whether filename
should be overwritten on disc.
Additional arguments to pass to the selected sampling algorithm.
This is leveraged when used by sample_existing()
internally