Skip to contents

For each Sample, get age uncertainty estimates from the Vault database. Age uncertainties represent multiple iterations of age-depth modelling and are stored in the SampleUncertainty table.

Usage

get_age_uncertainty(con = NULL, return_raw_data = FALSE)

Arguments

con

A vault_pipe object created by open_vault(). Must already contain sample_id in the data, i.e. get_samples() must have been called earlier in the pipe.

return_raw_data

A logical indicating whether to return raw long-format data. If FALSE (default), returns a wide tibble with one row per sample identified by sample_name and one column per iteration (e.g. iteration_1, iteration_2, ...). If TRUE, returns the raw long-format tibble with columns sample_id, iteration, and age_uncertainty.

Value

When return_raw_data = FALSE (default): a wide tibble with sample_name as the key column and one column per age-model iteration (e.g. iteration_1, iteration_2, ...), restricted to the samples present in the incoming pipe. When return_raw_data = TRUE: a long tibble with columns sample_id, iteration, and age_uncertainty.