triangles_virtual: Conservative Index evaluation using virtually generated...

View source: R/triangles_virtual.R

triangles_virtualR Documentation

Conservative Index evaluation using virtually generated 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 replaced by uniformly random values in [0, 1] (virtual approach).

Usage

triangles_virtual(
  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

External txtProgressBar object. Default NULL.

pb_offset

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

tracer_current

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

tracer_total

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

verbose

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

Value

A data frame with nrow(mixtures) * iter rows containing mixture ID, GOF (fixed at 1), and apportioned weights per source.


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