Skip to contents

A single run is computed following these steps:

  • Subset levels into each bin to define Working Units.

  • Optionally standardise assemblage counts in each WU.

  • Calculate dissimilarity between consecutive WUs.

  • Standardise dissimilarity by age difference between WUs.

Usage

run_iteration(
  data_source_run,
  bin_selection = "first",
  standardise = FALSE,
  n_individuals = 150,
  tranform_to_proportions = TRUE,
  dissimilarity_coefficient = "euc",
  time_standardisation = 500
)

Arguments

data_source_run

list with data and bins prepared by prepare_data(), and optionally rng_stream, a random-number stream from util_make_rng_streams(). If rng_stream is present, it is set before any random draw, so the run gives the same result wherever it is computed. Without it, the run draws from the current generator.

bin_selection

character. Rule for selecting one level from each bin.

  • "random" (default) - a level is selected at random.

  • "first" - the level closest to the start of the bin is selected.

standardise

logical. If TRUE, assemblage counts in each WU are rarefied to n_individuals before dissimilarity is computed.

n_individuals

numeric. Number of individuals to rarefy to when standardise = TRUE. Automatically reduced to the smallest count in the sequence if any WU has fewer individuals.

tranform_to_proportions

logical. If TRUE (default), community data are converted to proportions before dissimilarity is computed.

dissimilarity_coefficient

character. Dissimilarity coefficient used to compare consecutive WUs. See vegan::vegdist() for details.

  • "euc" - Euclidean distance

  • "euc.sd" - standardised Euclidean distance

  • "chord" - Chord distance

  • "chisq" - Chi-squared coefficient

  • "gower" - Gower's distance

  • "bray" - Bray-Curtis dissimilarity

time_standardisation

numeric. Time unit for RoC values. RoC is reported as dissimilarity per time_standardisation years. Defaults to bin_size when NULL.

Value

A tibble with one row per WU pair containing columns Age, ROC, ROC_up, ROC_dw, and Working_Unit.

See also