Skip to contents

Extract, validate, and align the community and age data ready for RoC estimation.

Usage

extract_data(
  data_community_extract,
  data_age_extract,
  age_uncertainty = NULL,
  verbose = FALSE,
  silent = FALSE
)

Arguments

data_community_extract

Data.frame. Community data with species as columns and levels (samples) as rows. First column should be sample_id (character).

data_age_extract

Data.frame with two columns:

  • sample_id - unique ID of each level (character)

  • age - age of level (numeric)

age_uncertainty

Usage of age uncertainty form Age-depth models. Either:

  • matrix with number of columns as number of samples. Each column is one sample, each row is one age sequence from age-depth model. Age sequence is randomly sampled from age-depth model uncertainties at the beginning of each run.

  • NULL - Age uncertainties are not available and, therefore, will not be used.

verbose

logical. If TRUE, print progress messages during extraction.

silent

Logical. If TRUE, suppress all console outputs (overrides verbose). Useful for testing.

Value

A named list with elements community (data.frame), age (data.frame), and optionally age_un (matrix).