Sample-based rarefaction prevents temporal variation in sampling
effort from affecting diversity estimates (see Gotelli N.J., Colwell R.K.
2001 Quantifying biodiversity: procedures and pitfalls in the measurement and
comparison of species richness. Ecology Letters 4(4), 379-391) by selecting
an equal number of samples across all years in a time series.
resampling counts the number of unique samples taken in each year
(sampling effort), identifies the minimum number of samples across all years,
and then uses this minimum to randomly resample each year down to that
number. Thus, standardising the sampling effort between years, standard
biodiversity metrics can be calculated based on an equal number of samples
(e.g. using getAlphaMetrics, getAlphaMetrics).
measure is a character input specifying the chosen currency to
be used during the sample-based rarefaction. It can be a single column name
or a vector of two or more column names - e.g. for BioTIME,
measure="ABUNDANCE", measure="BIOMASS" or measure =
c("ABUNDANCE", "BIOMASS").
By default, any observations with NA within the currency field(s) are
removed. You can choose to remove the full sample where such observations are
present by setting conservative to TRUE. resamps can be
used to define multiple iterations, effectively creating multiple alternative
datasets as in each iteration different samples will be randomly selected for
the years where number of samples > minimum. Note that the function always
returns a single data frame, i.e. if resamps > 1, the returned data
frame is the result of individual data frames concatenated together, one from
each iteration identified by a numerical unique identifier 1:resamps.