triangles_dataset: Conservative Index evaluation using randomly sampled...

View source: R/triangles_dataset.R

triangles_datasetR Documentation

Conservative Index evaluation using randomly sampled companion tracers

Description

For each tracer of interest, solves a series of minimal determined linear systems to assess how consistently that tracer constrains the source apportionment. In each iteration the tracer under evaluation is kept fixed while the remaining tracers needed to complete the system are drawn at random from the other measured tracers in the dataset.

Usage

triangles_dataset(
  sources,
  mixtures,
  tracer = 0L,
  iter = 100L,
  seed = 69512L,
  pb = NULL,
  pb_offset = 0L,
  tracer_current = NULL,
  tracer_total = NULL,
  verbose = TRUE
)

Arguments

sources

Data frame of source statistics: ID, one mean column per tracer, one SD column per tracer, and sample size n.

mixtures

Data frame of mixture samples with the same tracer columns.

tracer

Integer (0-based). Index of the tracer under evaluation.

iter

Integer. Number of Monte Carlo iterations per mixture sample. Default 100L.

seed

Integer. Random seed for reproducibility. Default 69512L.

pb

An optional txtProgressBar object created externally. Default NULL.

pb_offset

Integer. Starting offset for the external progress bar. Default 0L.

tracer_current

Integer. Position of this tracer in the outer loop. Default NULL.

tracer_total

Integer. Total number of tracers in the outer loop. Default NULL.

verbose

Logical. Whether to print tracer progress messages to the console. Default is TRUE.

Details

This function is called internally by CI_Method() and is not usually invoked directly by the user.

Value

A data frame with nrow(mixtures) * iter rows containing mixture ID, GOF, and estimated source proportions (w.*).

See Also

CI_Method


OceanTracer documentation built on Oct. 15, 2026, 5:09 p.m.