prefilter_tracers: Prefilter tracers and clean raw or summary source datasets

View source: R/prefilter_tracers.R

prefilter_tracersR Documentation

Prefilter tracers and clean raw or summary source datasets

Description

Evaluates source samples and removes rows that exceed user-defined thresholds for missing isotopic ratios or missing/zero elemental contents. Absolute zeros in content columns are treated as analytically missing data and are actively converted to NAs to prevent downstream statistical bias. The mixture row (assumed to be the last row) is always preserved.

Usage

prefilter_tracers(data, max_na_ratio = 0.3, max_zero_content = 0.3)

Arguments

data

Data frame containing source and mixture samples. Supports raw and averaged formats.

max_na_ratio

Numeric. Maximum allowable proportion of missing ratio values per row (0 to 1). Default 0.30.

max_zero_content

Numeric. Maximum allowable proportion of missing or zero content values per row (0 to 1). Default 0.30.

Value

A cleaned data frame with failing source rows removed and zeros in content columns converted to NAs.


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