Skip to contents

Iterate over multiple sampling methods and sample sizes

Usage

monte_carlo(
  data,
  metrics = NULL,
  nSamp,
  iter,
  method = NULL,
  cores = NULL,
  ...
)

Arguments

data

an sf of type POINT

metrics

a vector of character strings that match desired column names in data

nSamp

a numeric scalar greater than 0 and less than the number of rows in data

iter

a numeric scalar greater than 0

method

The method to use for sampling. Can be "clhs" for Latin Hypercube Sampling, "balanced" else for Balanced Sampling, "srs" for Simple Random Sampling, or "strat" for stratified sampling. If method = "strat", data must have an attribute named strata

cores

Number of cores to use for parallel computation

...

parameters to pass to sgsR::sample_ahelssample_ahels

Value

a list of sampled datasets

Details

This function iterates over multiple sampling methods and sample sizes using utils_sample(). The function assumes that users have removed coordinate columns if a data.frame has been provided. Any NA values in data will be dropped.