Creates a list of environments sampled from a population with user-defined sample size.
Usage
sample_met(
ntraits = 1,
nenvs = 1000,
nsamples = 10,
sample.size = 20,
replace = TRUE,
cov.mat = NULL
)
Arguments
- ntraits
A scalar defining the number of traits.
- nenvs
A scalar defining the number of environments in the target population.
- nsamples
A scalar defining the number of samples to be taken.
- sample.size
A vector defining the number of environments in each sample. When only one value is specified, all samples will be assigned the same number.
- replace
When
TRUE
(default), samples are taken with replacement. Ignored whennsamples = 1
.- cov.mat
An optional matrix of environmental covariates for one or more traits. When supplied, the covariates are sampled and printed.